diff --git a/fractal_server/app/db/__init__.py b/fractal_server/app/db/__init__.py index 22178a54ab..2c59113a31 100644 --- a/fractal_server/app/db/__init__.py +++ b/fractal_server/app/db/__init__.py @@ -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(