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(`