diff --git a/src/core/database/database.py b/src/core/database/database.py index 4c55a1f..f9df89c 100644 --- a/src/core/database/database.py +++ b/src/core/database/database.py @@ -6,10 +6,12 @@ # Create an async SQLAlchemy engine engine = create_async_engine( settings.DATABASE_URL, + pool_pre_ping=True, + pool_size=10, + max_overflow=90, pool_timeout=settings.POOL_TIMEOUT, pool_recycle=settings.POOL_RECYCLE, # echo=(settings.ENV != "PRD"), - pool_pre_ping=True, ) # Create a session factory