fix 优化连接参数
This commit is contained in:
@ -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)
|
||||
|
Reference in New Issue
Block a user