Vous n'êtes pas identifié(e).
- Contributions : Récentes | Sans réponse
Pages : 1
#1 Re : Général » Requete interminable » 21/12/2017 13:35:25
Je viens de trouver la réponse
je te remercie beaucoup
c'est un problème fictionnel qui est :
Deux personne qui sont responsables ( l'un est responsable de l'autre et inversement)
Tout est bon
Merci beaucoup
#2 Re : Général » Requete interminable » 20/12/2017 17:08:15
Je suis sur la version 9.6, il n'y pas la colonne waiting
par contre j'ai cette requête : select pid, state, xact_start,query from pg_stat_activity where state = 'active';
qui me renvoie :
pid | state | xact_start | query
-------+--------+-------------------------------+-----------------------------------------------------------------------------------
21399 | active | 2017-12-20 15:42:52.377782+01 | SELECT "parent_id" FROM "hr_employee" WHERE id = 99
25629 | active | 2017-12-20 16:05:36.218966+01 | select pid, state, xact_start,query from pg_stat_activity where state = 'active';
sachant que à l'heure ou j’écris la requête tourne encore, donc elle mis plus de 20 mn
il reste bloqué sur cette requête mais je ne sais c'est quoi le problème, ou dois-je trouver la log
Merci bcps pour ton aide
#3 Re : Général » Requete interminable » 20/12/2017 13:41:26
Le problème c'est la Lenteur, pas de réponse,
L’interface continue de tourner
Dans la log du serveur (Log Python), c'est la base de donnée qui ne donne pas de réponse
J'ai même repris la requête exécutée par l'interface ERP et lancé directement sur la base, je n'ai pas de réponse aussi
Sachant que si j'arrête tous les process de requête, la petite requête "SELECT "parent_id" FROM "hr_employee" WHERE id = 13" s'execute et renvoie un résultat instantanément
J'aimerai bien savoir comment détecter à quel endroit la requête est bloquée, qu'est ce qui fait qu'elle tourne sans arrêt
Merci
#4 Général » Requete interminable » 19/12/2017 16:12:20
- mlm
- Réponses : 6
Bonjour j'ai un grand souci avec une requête qui provient de l'ERP ODOO, quand j'essaie de modifier des informations dans une interface qui touche à la table hr_employee
j'ai la requête des statistiques suivante
SELECT
pg_stat_activity.pid,
pg_class.relname,
pg_locks.transactionid,
pg_locks.granted,
mode,
query,
age(now(),pg_stat_activity.query_start) AS "age"
FROM pg_stat_activity,pg_locks left
OUTER JOIN pg_class
ON (pg_locks.relation = pg_class.oid)
WHERE pg_locks.pid = pg_stat_activity.pid
AND pg_stat_activity.pid <> pg_backend_pid()
qui me retourne un 0 ligne avant de faire une action sur l'interface de l'ERP. Mais dès que je fais une modification sur cette interface qui touche à la table hr_employee j'ai ce résultat
pid | relname | transactionid | granted | mode | query | age
-------+---------+---------------+---------+------------------+-----------------------------------------------------+------------------
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | ExclusiveLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | RowShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | 60292 | t | ExclusiveLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | RowExclusiveLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | AccessShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | RowShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | RowShareLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | RowExclusiveLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
27640 | | | t | RowExclusiveLock | SELECT "parent_id" FROM "hr_employee" WHERE id = 13 | -00:00:00.003182
J'aimerai bien comprendre d'ou vient le problème
Merci pour votre aide
Pages : 1