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?
I write daemon which use for DB SQLAlchemy. Database MySQL. If daemon idle long
Share
there’s a option “pool_recycle” when creating engine, see http://docs.sqlalchemy.org/en/rel_0_7/core/engines.html?highlight=pool_recycle