[ZODB-Dev] RelStorage and MySQL wait-timeout

Chris Withers chris at simplistix.co.uk
Tue Feb 1 12:51:00 EST 2011


Hi Shane,

On 01/02/2011 17:45, Shane Hathaway wrote:
> On 02/01/2011 10:01 AM, Chris Withers wrote:
>> OperationalError: (2006, 'MySQL server has gone away')
>>
>> ...which feels a little on the serious side for (what is for MySQL)
>> quite a normal situation to be in.
>
> Random disconnects are unacceptable for RelStorage. If MySQL goes away
> outside transaction boundaries, we *have* to propagate the exception to
> the application;

Are you sure you mean outside?
Surely outside is fine, you just reconnect as part of starting the 
transaction?

> otherwise consistency is lost. We can only reconnect at
> the next request or transaction boundary.

Indeed, and am I right in thinking RelStorage does this just fine, along 
with emitting a warning message to say that it has occurred?

I can understand the problem being fairly terminal if there was a 
disconnect *during* a timeout, and I'd expect an exception, but not a 
segfault ;-)

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk


More information about the ZODB-Dev mailing list