From c8b0e1c25fd6e65a0c1f79ebe69def5246289ae3 Mon Sep 17 00:00:00 2001 From: Divit Kashyap <162712154+divitkashyap@users.noreply.github.com> Date: Sun, 24 May 2026 15:20:00 +0100 Subject: [PATCH] fix(opencode): raise SQLite busy_timeout to 10s for concurrent writers The 5000ms default still trips SQLITE_BUSY on busy DBs (see issue #21215 for a +5015ms log). Bump to 10000ms so concurrent `opencode run` workers and multi-FD TUI sessions wait through longer WAL holds instead of failing the in-flight write. Closes #21215 Co-Authored-By: Claude Opus 4.7 (1M context) --- packages/opencode/src/storage/db.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/storage/db.ts b/packages/opencode/src/storage/db.ts index 06f1f84a9ae7..a5b373721cb3 100644 --- a/packages/opencode/src/storage/db.ts +++ b/packages/opencode/src/storage/db.ts @@ -103,7 +103,7 @@ export const Client = Object.assign( db.run("PRAGMA journal_mode = WAL") db.run("PRAGMA synchronous = NORMAL") - db.run("PRAGMA busy_timeout = 5000") + db.run("PRAGMA busy_timeout = 10000") db.run("PRAGMA cache_size = -64000") db.run("PRAGMA foreign_keys = ON") db.run("PRAGMA wal_checkpoint(PASSIVE)")