Skip to content

Commit

Permalink
fix: set pool_pre_ping to true (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakuboskera authored Feb 22, 2023
1 parent 1939665 commit a2dda14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class Config(object):
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
SQLALCHEMY_TRACK_MODIFICATIONS = False
SWAGGER_UI_DOC_EXPANSION = "list"
# pool_pre_ping should help handle DB connection drops
SQLALCHEMY_ENGINE_OPTIONS = {"pool_pre_ping": True}


class ProductionConfig(Config):
Expand Down

0 comments on commit a2dda14

Please sign in to comment.