[Twisted-Python] OT - adbapi, connection timeouts, mysql - OT

Phil Christensen phil at bubblehouse.org
Mon Aug 24 18:53:45 EDT 2009

On Aug 24, 2009, at 2:58 PM, Garret Heaton wrote:
> There is a solution to the reconnection issue posted here which one  
> of my friends improved upon. He wasn't on the list at the time of  
> this posting so I'm replying to this on his behalf. The improved  
> solution is:
>             # try the interaction again
>             return adbapi.ConnectionPool._runInteraction(self,  
> interaction, *args, **kw)

The thing that would concern me is that you can get a ConnectionLost  
error for a variety of different reasons, and they might not be raised  
by the first query issued in your interaction.

I feel like I can think of any number of ways running the same series  
of queries twice would be a bad thing. I have some very important  
queries that are run inside a interaction because they do a series of  
operations in sequence. I can't use transactions because my tables are  

Perhaps I'm jumping at shadows, but automatic re-querying just seems  
dangerous to me. Only the particular application knows when it's safe.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20090824/46f2b990/attachment.htm 

More information about the Twisted-Python mailing list