[Zope3-dev] rdb: Disappearing Connection

Christian Theune ct at gocept.com
Tue Dec 13 16:53:29 EST 2005


Am Dienstag, den 13.12.2005, 16:32 -0500 schrieb Jim Washington:
> Christian Theune wrote:
> 
> >Well. First, the error would be something like an OperationalError (or
> >similar). Hmm. Not too distinguishable. Ideally we could:
> >
> >  
> >
> 
> >- differentiate this kind of error from other OperationalErrors (like a
> >syntax error in your query)
> >  
> >
> The error in the traceback is
> 
> _mysql_exceptions.OperationalError: (2006, 'MySQL server has gone away')
> 
> >- delete the _v_connection
> >- restart the transaction
> >
> >Otherwise you might start over within a transaction that is out ouf sync
> >with the state of the mysql database.

> Good point. Though, this particular error is about idleness, so I would 
> think it unlikely that one would be resuming an 8-hour-old transaction. 
> Could that happen?

Sure. If I'd force it. But we can eventually ignore that with some good
faith for a moment.

That's a valid point. Additionally, IIRC this is a client message, not a
server message. The server closes the connection much earlier but the
client doesn't notice, as the client libraries are very very lazy.

That means you could just purge the connection and create a new one.

Still, we're not 100% sure that nothing was written to the connection
that is now silently assumed of having been saved whereas it isn't.

Christian

-- 
gocept gmbh & co. kg - schalaunische str. 6 - 06366 koethen - germany
www.gocept.com - ct at gocept.com - phone +49 3496 30 99 112 -
fax +49 3496 30 99 118 - zope and plone consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://mail.zope.org/pipermail/zope3-dev/attachments/20051213/9c047128/attachment.bin


More information about the Zope3-dev mailing list