We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 513f979 commit d279512Copy full SHA for d279512
app/__init__.py
@@ -51,6 +51,13 @@ def create_app():
51
# Load configuration
52
inscopeconfig = load_config()
53
app.config.update(inscopeconfig)
54
+
55
+ # Set SQLAlchemy engine options to mitigate connection issues
56
+ # This instructs SQLAlchemy to check connections before using them and to recycle them after an hour.
57
+ app.config['SQLALCHEMY_ENGINE_OPTIONS'] = {
58
+ 'pool_pre_ping': True,
59
+ 'pool_recycle': 3600
60
+ }
61
62
# Init cache
63
#cache.init_app(app)
0 commit comments