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;