[Twisted-Python] reconnecting ConnectionPools
Christopher Armstrong
radix at twistedmatrix.com
Sun Jul 25 13:28:31 EDT 2004
In my client's app we've been having problems with database connections
going down; so far if that happens we need to restart the server to
reconnect to the DB. I looked at adbapi's implementation and noticed
that it wasn't doing anything special to notice lost connections. Then I
realized DBAPI2 doesn't actually specify a way to tell whether your
connection has gone down.
I've been trying to think of a way to at least work around this on a
per-app basis -- mine is using psycopg. It just raises either a
ProgrammingError or an OperationalError on cursor.execute. The brightest
idea we've come up with is to reconnect after N (~ 3) consecutive errors.
Any other ideas?
--
Twisted | Christopher Armstrong: International Man of Twistery
Radix | Release Manager, Twisted Project
---------+ http://radix.twistedmatrix.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20040725/8dc9d015/attachment.pgp
More information about the Twisted-Python
mailing list