increase db connection pool
This commit is contained in:
@@ -8,7 +8,7 @@ from ..config import config
|
||||
# logger = logging.getLogger('sqlalchemy.engine')
|
||||
# logger.setLevel(logging.DEBUG)
|
||||
|
||||
async_engine = create_async_engine(config.DATABASE_URI)
|
||||
async_engine = create_async_engine(config.DATABASE_URI, pool_size=20, max_overflow=60)
|
||||
async_session = sessionmaker[AsyncSession](
|
||||
async_engine, class_=AsyncSession, expire_on_commit=False
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user