I write daemon which use for DB SQLAlchemy. Database MySQL. If daemon idle long time then connection is broken and I see errors. Is it possible to make connect which cannot close while daemon is work or how to make reconnect to DB?
there's a option "pool_recycle" when creating engine, see http://docs.sqlalchemy.org/en/rel_0_7/core/engines.html?highlight=pool_recycle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With