From 7c62de0a8aad35ab518598bfb032a3098662f4a6 Mon Sep 17 00:00:00 2001 From: Malin Date: Sat, 22 Aug 2026 13:39:56 +0200 Subject: [PATCH] fix: shrink prune batch size 2000->200, production hardware much slower than test box --- server.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.js b/server.js index bbc61a3..387842e 100644 --- a/server.js +++ b/server.js @@ -77,7 +77,9 @@ let _cache = null, _cacheTs = 0; // and batching the cleanup. const PRUNE_AGE = 30 * 86400; // 30 days in seconds -const PRUNE_BATCH = 2000; +const PRUNE_BATCH = 200; // 2000 was still multi-second per batch on production + // hardware (10x slower than the box this was tested + // on) - small enough here to actually stay responsive const stmtCountOld = DB.prepare('SELECT COUNT(*) n FROM bots WHERE received_at < ?'); const stmtSummarizeBatch = DB.prepare(`