I tried all you said. Here is my code:
engine = create_engine(db_url,
pool_size=100,max_overflow=150,echo=engine_echo,pool_recycle=3600)
And, in the beginning, I googled a lot and add this:
def _ping_db():
#session.execute('show variables')
try:
session.execute('select 1')
ex
I just find a solution that try to ping database server by select 1 every
give time.
Thanks all you guys.
--
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to sqlalch
On Dec 17, 2011, at 12:56 PM, Sharpek wrote:
> Hi,
>
> I think it is not BEAKER problem, this is another trackback:
it only happens because:
a. MySQL timed out the connection. this takes eight hours and you have
pool_recycle on so that's not it.
b. someone actually restarted MySQL. I'm assu
Hi,
I think it is not BEAKER problem, this is another trackback:
2011-12-17 18:54:05,371 INFO sqlalchemy.pool.QueuePool Invalidate
connection <_mysql.connection open to 'localhost' at 2502c20> (reason:
OperationalError:(2006, 'MySQL server has gone away'))
2011-12-17 18:54:05,372 INFO sqlalchemy.