From: jason kirtland <j...@discorporate.us>
Date: Mon, 08 Jun 2009 07:49:44 -0700
Local: Mon, Jun 8 2009 10:49 am
Subject: Re: [sqlalchemy] Re: MySQL has gone away (again)
Kamil Gorlo wrote: Another cause of "went away" messages is a query that exceeds the > On Thu, Jun 4, 2009 at 4:20 PM, Michael Bayer<mike...@zzzcomputing.com> wrote: >> the connection went from good to dead within a few seconds (assuming SQL >> was successfully emitted on the previous checkout). Your database was >> restarted or a network failure occurred. > There is no other option? I'm pretty sure that DB was not restarted, configured memory resources on the server. Taking a look at MySQL's logs may shed more light & give hints for which buffers need tuning if that's the problem. > But, assuming this is external problem - is there any way to tell Yes, with a simple pool event listener you can ensure the liveliness of > SQLAlchemy to try another connection for the same request (instead of > returning HTTP 500 for user), or maybe other pooling strategy or even > something else? connections before the pool hands them out for use. Usage example is attached. Cheers, class LookLively(object): def checkout(self, dbapi_con, con_record, con_proxy):
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| |||||||||||||||||