psycopg2 hang with multithread frequent queries

Поиск
Список
Период
Сортировка
От David Roid
Тема psycopg2 hang with multithread frequent queries
Дата
Msg-id CAKN1bq7fLb_V2nQCa0-DSsAyAghtUPG-BgODuyPOCVAR9M6Y4w@mail.gmail.com
обсуждение исходный текст
Ответы Re: psycopg2 hang with multithread frequent queries  (Daniele Varrazzo <daniele.varrazzo@gmail.com>)
Re: psycopg2 hang with multithread frequent queries  (David Roid <dataroid@gmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Oliver Beattie
Дата:
Сообщение: Re: Tracebacks with gevent and set_wait_callback go "missing"
Следующее
От: Daniele Varrazzo
Дата:
Сообщение: Re: psycopg2 hang with multithread frequent queries