On Nov 2, 3:40 pm, Stefano Fontanelli <[email protected]> wrote: > Il 02/11/11 18.54, Benjamin Sims ha scritto: > > > My ini file contains: > > > sqlalchemy.pool_recycle = 30 > > Hi Benjamin, > did you try to increase pool_recycle? > > In our applications we use 'sqlalchemy.pool_recycle = 3600'
When you get that error, it means that pool_recycle is > mysql's idle timeout - increasing the timeout will increase the possibility that this will happen. The first question to address this is, are you connecting via socket or tcp? because you MIGHT be hitting a TCP timeout rather than a mysql idle timeout. If so, you need to fix that from the TCP side. Most operating systems will default to 600 seconds, however, your pool_recycle time of 30 seconds should be well under that. One possibility is to reduce pool_recycle to 10, or, turn echo_pool on in your debugs to see what is happening. With pools, it is possible that you have an idle pool that is being hit that has timed out. If it persists, you could import NullPool and set poolclass=NullPool, however, that might introduce threading/concurrency issues on a busy system. I've run pool_recycle at 10 to eliminate that problem, but, I connect via sockets rather than tcp on most machines. Also, you might check wait_timeout= to see if that value is set too low. I don't recall if sqlalchemy uses CLIENT_INTERACTIVE or not - I don't believe it does, which means interactive_timeout= isn't the variable to set. I don't see that it sends CLIENT_INTERACTIVE to MySQLdb, so, you might check wait_timeout to see if it is set too low. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
