Skip to content

Commit

Permalink
Set pool_pre_ping=True for asyncpg-driven async DB engine (ref #954)
Browse files Browse the repository at this point in the history
  • Loading branch information
tcompa committed Nov 29, 2023
1 parent 023a01f commit 8682ae2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fractal_server/app/db/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def set_db(cls):
connect_args={"check_same_thread": False},
)
else:
engine_kwargs_async = {}
engine_kwargs_async = {
"pool_pre_ping": True,
}
engine_kwargs_sync = {}

cls._engine_async = create_async_engine(
Expand Down

0 comments on commit 8682ae2

Please sign in to comment.