From b5e7f6313fa3498b3310cbd9265abdf60bfd7df6 Mon Sep 17 00:00:00 2001 From: Windpicker-owo <3431391539@qq.com> Date: Mon, 8 Dec 2025 18:11:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(sqlite):=20=E8=B0=83=E6=95=B4busy=5Ftimeout?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E4=B8=BA10=E7=A7=92=E4=BB=A5=E5=87=8F?= =?UTF-8?q?=E5=B0=91=E9=94=81=E5=AE=9A=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/database/core/engine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/database/core/engine.py b/src/common/database/core/engine.py index ac8ccdec5..0b1f724d4 100644 --- a/src/common/database/core/engine.py +++ b/src/common/database/core/engine.py @@ -208,7 +208,7 @@ async def _enable_sqlite_optimizations(engine: AsyncEngine): # 启用外键约束 await conn.execute(text("PRAGMA foreign_keys = ON")) # 设置busy_timeout,避免锁定错误 - await conn.execute(text("PRAGMA busy_timeout = 60000")) + await conn.execute(text("PRAGMA busy_timeout = 10000")) # 设置缓存大小(10MB) await conn.execute(text("PRAGMA cache_size = -10000")) # 临时存储使用内存