From b811dcf19d01fee2dfa09eaa23a08cea8740d005 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sat, 11 Apr 2020 14:34:34 +0200 Subject: [PATCH] Fix pool recycle on MySQL --- pynyaata/config.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pynyaata/config.py b/pynyaata/config.py index d4fb3dd..bc75466 100644 --- a/pynyaata/config.py +++ b/pynyaata/config.py @@ -35,4 +35,7 @@ if db_host: ) app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = True app.config['SQLALCHEMY_ECHO'] = IS_DEBUG + app.config['SQLALCHEMY_ENGINE_OPTIONS'] = { + 'pool_recycle': 200 + } db = SQLAlchemy(app)