psycopg2 hang with multithread frequent queries - Mailing list psycopg

From David Roid
Subject psycopg2 hang with multithread frequent queries
Date
Msg-id CAKN1bq7fLb_V2nQCa0-DSsAyAghtUPG-BgODuyPOCVAR9M6Y4w@mail.gmail.com
Whole thread Raw
Responses Re: psycopg2 hang with multithread frequent queries
Re: psycopg2 hang with multithread frequent queries
List psycopg
Greetings list,

I'm using psycopg2, python2.7.3 threading along with pgsql 9.1.5. I noticed that if I have my python process query against the database kind of frequently, say more than 1 query per second, it's almost 100% sure to hit some problem, but first some backgroud:

1. There are three threads, each with many SELECT/UPDATE, a little bit INSERT, only one explicit 'LOCK TABLE'
2. One of threads queries the db every second (easier to reproduce this way)
3. The other two do their queries like every 10~30 seconds
4. It doesn't matter whether the threads share one connection or with separate connection,

And there are two kind of  symptons:
1.

psycopg by date:

Previous
From: Oliver Beattie
Date:
Subject: Re: Tracebacks with gevent and set_wait_callback go "missing"
Next
From: Daniele Varrazzo
Date:
Subject: Re: psycopg2 hang with multithread frequent queries