diff --git a/geoapi/db.py b/geoapi/db.py index 16b2c8a9..cab48c49 100644 --- a/geoapi/db.py +++ b/geoapi/db.py @@ -9,7 +9,10 @@ settings.DB_HOST, settings.DB_NAME ) -engine = create_engine(CONNECTION_STRING, echo=False) +engine = create_engine(CONNECTION_STRING, + echo=False, # default value + pool_pre_ping=True, + pool_reset_on_return=True) db_session = scoped_session(sessionmaker(autocommit=False, autoflush=False,