From fa7bda7a0f3e64f29b719c62c6497a0cfb1c775c Mon Sep 17 00:00:00 2001 From: Oleg Date: Fri, 31 Jul 2026 16:44:38 +0000 Subject: [PATCH] Bump build-time SQLITE_BUSY timeout from 5s to 30s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Docker build started failing intermittently again with more routes now collecting page data concurrently — 5s wasn't always enough for workers racing to init the fresh build-time db.sqlite. This only costs time during that one-off build step, not runtime. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01QcXH24ky6zjk2UyK5oZUPH --- src/lib/db/client.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/lib/db/client.ts b/src/lib/db/client.ts index 993a134..832c34a 100644 --- a/src/lib/db/client.ts +++ b/src/lib/db/client.ts @@ -13,8 +13,9 @@ sqlite.pragma("foreign_keys = ON"); // Next's build-time page-data collection evaluates route modules across // several worker processes concurrently — without this, two workers // racing to open/initialize a fresh db.sqlite can throw SQLITE_BUSY -// instead of just waiting the few ms for the other's lock to clear. -sqlite.pragma("busy_timeout = 5000"); +// instead of just waiting for the other's lock to clear. 5s wasn't enough +// once the route count grew — bumped to 30s (build-time only cost). +sqlite.pragma("busy_timeout = 30000"); export const db = drizzle(sqlite, { schema }); export type DB = typeof db;