Skip to content

Commit

Permalink
add pessimistic handling of disconnections
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderegg committed Mar 10, 2022
1 parent 9d735ed commit 66fcd7e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions services/catalog/src/simcore_service_catalog/db/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ async def connect_to_db(app: FastAPI) -> None:
connect_args={
"server_settings": {"application_name": cfg.POSTGRES_CLIENT_NAME}
},
pool_pre_ping=True, # https://docs.sqlalchemy.org/en/14/core/pooling.html#dealing-with-disconnects
)

logger.debug("Connected to %s", engine.url) # pylint: disable=no-member
Expand Down

0 comments on commit 66fcd7e

Please sign in to comment.