Bump build-time SQLITE_BUSY timeout from 5s to 30s
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QcXH24ky6zjk2UyK5oZUPH
This commit is contained in:
1 parent
904f09ff09
commit
fa7bda7a0f
1 file changed
+3
-2
@@ -13,8 +13,9 @@ sqlite.pragma("foreign_keys = ON");
|
|||||||
// Next's build-time page-data collection evaluates route modules across
|
// Next's build-time page-data collection evaluates route modules across
|
||||||
// several worker processes concurrently — without this, two workers
|
// several worker processes concurrently — without this, two workers
|
||||||
// racing to open/initialize a fresh db.sqlite can throw SQLITE_BUSY
|
// 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.
|
// instead of just waiting for the other's lock to clear. 5s wasn't enough
|
||||||
sqlite.pragma("busy_timeout = 5000");
|
// once the route count grew — bumped to 30s (build-time only cost).
|
||||||
|
sqlite.pragma("busy_timeout = 30000");
|
||||||
|
|
||||||
export const db = drizzle(sqlite, { schema });
|
export const db = drizzle(sqlite, { schema });
|
||||||
export type DB = typeof db;
|
export type DB = typeof db;
|
||||||
Reference in new issue
Block a user