chore: update database connection settings with pool size and timeout configurations

This commit is contained in:
swve 2025-03-16 11:18:38 +01:00
parent 3a95abfa6f
commit 6ebac01c61

View file

@ -35,7 +35,11 @@ learnhouse_config = get_learnhouse_config()
engine = create_engine(
learnhouse_config.database_config.sql_connection_string, # type: ignore
echo=False,
pool_pre_ping=True # type: ignore
pool_pre_ping=True, # type: ignore
pool_size=10,
max_overflow=20,
pool_recycle=300, # Recycle connections after 5 minutes
pool_timeout=30
)
# Create all tables after importing all models