[Twisted-Python] OT - adbapi, connection timeouts, mysql - OT
Phil Christensen
phil at bubblehouse.org
Tue Aug 25 09:29:32 MDT 2009
On Aug 25, 2009, at 11:25 AM, Phil Mayers wrote:
> Phil Christensen wrote:
>> Honestly, I have never actually solved it. I pretty much only write
>> webapps these days, so when a ConnectionLost happens, it just
>> propagates up the stack and displays an error to the user. Not ideal,
>> by any means.
>
> It's hard to apply in the general case, but I like the way Zope
> handles
> this using the per-request transaction machinery.
>
> Basically, if any processing generates a "retry"able exception, all
> transactions attached to the request are rolled back and the entire
> request re-submitted.
That's definitely the preferable solution, but an additional problem
is you still can't use transactions with MyISAM-backed tables.
Yeah yeah, we should be using postgres, sqllite, or even InnoDB ;-)
Of course sometimes that's just not an option...
-phil
More information about the Twisted-Python
mailing list