[Twisted-Python] twisted.enterprise.adbapi and connection pool problem

James Y Knight foom at fuhm.net
Mon Feb 14 21:03:23 EST 2005


On Feb 14, 2005, at 4:05 PM, snacktime wrote:
> Attempting reconnects just isn't part of adbapi as far as I can tell.

It is part of adbapi in Twisted 2.0 (see cp_reconnect arg to the 
DatabasePool constructor). However, it will only reconnect after 
failing a query. It will never retry a query (that could be unsafe to 
do), but will re-establish the database connection after that query 
fails. Thus, subsequent queries will succeed.

If you know some way to tell for sure that it there is no possibility 
that the query has been executed, you could submit a patch for adbapi 
that it will retry the query in those circumstances.

James





More information about the Twisted-Python mailing list