From 426597b5974214ba2422d5c65ba6c28dcf4fbd46 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Fri, 7 Apr 2017 18:37:45 -0700 Subject: [PATCH] Recycle mysql connections to prevent disconnect errors --- titanembeds/app.py | 1 + 1 file changed, 1 insertion(+) diff --git a/titanembeds/app.py b/titanembeds/app.py index b62c940..6d5b2d2 100644 --- a/titanembeds/app.py +++ b/titanembeds/app.py @@ -14,6 +14,7 @@ app = Flask(__name__, static_folder="static") app.config['SQLALCHEMY_DATABASE_URI'] = config['database-uri'] app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False # Suppress the warning/no need this on for now. app.config['RATELIMIT_HEADERS_ENABLED'] = True +app.config['SQLALCHEMY_POOL_RECYCLE'] = 250 app.secret_key = config['app-secret'] db.init_app(app)