fix 优化连接参数

This commit is contained in:
jxxghp
2023-10-17 19:39:19 +08:00
parent 453ef94e4d
commit f15ccadc2d
9 changed files with 33 additions and 30 deletions

View File

@ -9,9 +9,9 @@ Engine = create_engine(f"sqlite:///{settings.CONFIG_PATH}/user.db",
echo=False,
poolclass=QueuePool,
pool_size=1024,
pool_recycle=600,
pool_recycle=3600,
pool_timeout=180,
max_overflow=0,
max_overflow=10,
connect_args={"timeout": 60})
# 会话工厂
SessionFactory = sessionmaker(autocommit=False, autoflush=False, bind=Engine)