From 60958d14035e41126b4bc0bee22a92667b4e1e42 Mon Sep 17 00:00:00 2001 From: dami Date: Sun, 5 Jul 2026 03:56:13 +0800 Subject: [PATCH] Update webstats_common.lua --- plugins/webstats/lua/webstats_common.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/webstats/lua/webstats_common.lua b/plugins/webstats/lua/webstats_common.lua index a03056a60..d43c37aa8 100644 --- a/plugins/webstats/lua/webstats_common.lua +++ b/plugins/webstats/lua/webstats_common.lua @@ -131,6 +131,7 @@ function _M.initDB(self, input_sn) db:exec([[PRAGMA page_size = 32768]]) db:exec([[PRAGMA journal_mode = wal]]) db:exec([[PRAGMA journal_size_limit = 21474836480]]) + db:exec([[PRAGMA busy_timeout = 5000]]) return db end @@ -467,6 +468,9 @@ end 7. 提交事务并关闭连接 ]] function _M.cron(self) + if ngx.worker.id() ~= 0 then + return + end --[[ 定时任务核心处理函数