On Mon, Aug 24, 2009 at 3:53 PM, Phil Christensen <p...@bubblehouse.org>wrote:

> On Aug 24, 2009, at 2:58 PM, Garret Heaton wrote:
>
> There is a solution to the reconnection issue posted 
> here<http://www.gelens.org/2008/09/12/reinitializing-twisted-connectionpool/>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:
>
> [snip]
>
>             # 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.
>

Interesting, I'll have to look in to this a bit more.


> 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 MyISAM.
>
> Perhaps I'm jumping at shadows, but automatic re-querying just seems
> dangerous to me. Only the particular application knows when it's safe.
>

This is very true, and I should have mentioned it in my reply. Re-running
queries is only possible when you know your application can do it safely.

How would you solve the issue of a lost connection in your case?


> -phil
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>
_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to