From 7d1f804ff03c4a48e49df28266e3f04b6ce43f4c Mon Sep 17 00:00:00 2001 From: martsforever Date: Mon, 22 Sep 2025 13:13:48 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B0=83=E6=95=B4=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E5=BA=93=E8=BF=9E=E6=8E=A5=E5=8F=82=E6=95=B0pool=5Frecycle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/utils/db_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/db_utils.py b/app/utils/db_utils.py index c195983..7e15641 100644 --- a/app/utils/db_utils.py +++ b/app/utils/db_utils.py @@ -22,7 +22,7 @@ async_engine = AsyncEngine(create_engine( pool_size=5, # 连接池保持的连接数 max_overflow=10, # 允许超过pool_size的最大连接数 pool_timeout=30, # 获取连接的超时时间(秒) - pool_recycle=3600, # 连接回收时间(秒) + pool_recycle=300, # 连接回收时间(秒) echo=True, # 启用SQL语句日志输出,便于开发调试 future=True, # 启用SQLAlchemy 2.0风格的未来模式API ))