Skip to content

Commit d279512

Browse files
committed
fix idle tab ssl issue
1 parent 513f979 commit d279512

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/__init__.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ def create_app():
5151
# Load configuration
5252
inscopeconfig = load_config()
5353
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+
}
5461

5562
# Init cache
5663
#cache.init_app(app)

0 commit comments

Comments
 (0)