From: | David Roid <dataroid(at)gmail(dot)com> |
---|---|
To: | Federico Di Gregorio <fog(at)dndg(dot)it> |
Cc: | psycopg(at)postgresql(dot)org |
Subject: | Re: psycopg2 hang with multithread frequent queries |
Date: | 2012-09-14 17:15:39 |
Message-ID: | CAKN1bq6EKO7cFKRMH_Sz3szeQbezsrr50gCV0kizWkiHwxiEzA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | psycopg |
Hi Federico,
No long-running trac, commit is done fair often. I also tried "one conn for
all threads" vs "one conn for one thread", and "one cursor all the way" vs
"use and throw away cursor", issue remains.
I install psycopg2.4.5 with easy_install, do I need to build psycopg2 from
source to enable debug info?
Thanks!
-David
2012/9/15 Federico Di Gregorio <fog(at)dndg(dot)it>
> On 14/09/2012 18:55, David Roid wrote:
> > And there are two kind of symptons after the process running for a
> > couple of minutes:
> > (0. At first it seems ok, each thread does its job, the quick one with
> > more logs of course)
> > 1. The quick one keeps running, the other two get no chance being called
> > any more
> > 2. When one of the slow ones get called, the whole python process hang,
> > with the postgresql process in 'idle in transaction'; note i'm very
> > alert with psycopg2's all-in-transaction style, i'm very sure there is a
> > commit/rollback to end the trac, the python process just stucks!
> >
> > I'm doing this test/investigate with freeload, so CPU/code conditions
> > should not be a cause, i'm starting to suspect psycopg2 or postgresql,
> > any hint?
>
> How many connections are you using? Cursors? Do you commit or keep a
> very long running transaction? Please give us some more information and
> compile psycopg with debugging enabled to have the logs ready for analsys.
>
> federico
>
> --
> Federico Di Gregorio federico(dot)digregorio(at)dndg(dot)it
> Studio Associato Di Nunzio e Di Gregorio http://dndg.it
> There's no greys, only white that's got grubby. I'm surprised you
> don't know that. And sin, young man, is when you treat people as
> things. Including yourself. -- Granny Weatherwax
>
From | Date | Subject | |
---|---|---|---|
Next Message | Daniele Varrazzo | 2012-09-14 17:26:11 | Re: psycopg2 hang with multithread frequent queries |
Previous Message | Vishnu VV | 2012-09-14 17:13:58 | commercial license availability |