Brien Voorhees
2010-06-15 21:43:47 UTC
Greetings,
I have a long-running python program that continually cycles through a
list of servers and queries them to retrieve data. Occasionally (every
few days) it will get stuck in a pyscopg2 function call. For
reference, the program is running on linux and using psycopg2 2.0.14
with python 2.6.
I've seen it get stuck in both cur.execute() and also in
pyscopg2.connect(). I'm guessing it's due to some network error or an
unresponsive postgres server.
Is there any way to specify a timeout or some other recommended solution?
Thanks
-Brien
I have a long-running python program that continually cycles through a
list of servers and queries them to retrieve data. Occasionally (every
few days) it will get stuck in a pyscopg2 function call. For
reference, the program is running on linux and using psycopg2 2.0.14
with python 2.6.
I've seen it get stuck in both cur.execute() and also in
pyscopg2.connect(). I'm guessing it's due to some network error or an
unresponsive postgres server.
Is there any way to specify a timeout or some other recommended solution?
Thanks
-Brien