On 05/03/2011 01:39 AM, Chris Withers wrote:
> On 27/04/2011 18:11, Shane Hathaway wrote:
>>> OperationalError: (2006, 'MySQL server has gone away')
>>> This is happening across at least two separate instances with separate
>>> storages.
>>> Any ideas?
>> Maybe the query is killing MySQL, for whatever reason.
> I don't think so, since I'd then expect all the other storages served by
> that cluster to complain similarly.

Not necessarily.  RelStorage reconnects automatically.  The reconnection 
is invisible unless the disconnect happens in the middle of a request, 
in which case RelStorage raises the error then automatically reconnects 
on the next request.

> However, it's literally just the thread handling this particular request
> that shows the error...

Two ideas:

- MySQL is dropping the connection after a long period of inactivity, 
then RelStorage doesn't notice it's dropped until it's too late. 
Connections that poll take defensive steps to prevent that, but maybe 
you're using a connection that does not poll.

- A single MySQL thread is dying.  (Is MySQL multithreaded?)

For more information about ZODB, see the ZODB Wiki:

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to