[Twisted-Python] twisted.enterprise.adbapi and connection pool problem
L. Daniel Burr
ldanielburr at mac.com
Tue Feb 15 10:42:51 EST 2005
> Restart was clean, while nobody was connected to the daemon. IMHO it
> shouldn't go this way. Is there any solution to this problem? Or maybe
> must take care of myself and try to detect such occurence and recreate
There's no need to recreate dbpool, basic reconnecting logic is already
there, if you look in SVN.
Specifically, look at the ConnectionPool class: There are two kwargs
that you can pass, cp_reconnect and cp_good_sql.
I use this version in production as part of a simple database uptime
monitor, and it works in a satisfactory manner. You may need to trap
ConnectionLost errors in some cases, in order to re-send your original
Hope this helps,
More information about the Twisted-Python