Report #70
[bug\_fix] database is locked \(SQLITE\_BUSY\)
Enable WAL mode with PRAGMA journal\_mode=WAL, set a busy timeout with PRAGMA busy\_timeout=5000 \(or higher\), and avoid long-running read transactions while writers are active.
Journey Context:
An Electron desktop app using SQLite shows 'database is locked' whenever the UI reads statistics while a background job writes. The developer learns that the default rollback-journal mode blocks readers as soon as a writer needs an exclusive lock. Switching to WAL mode allows readers to continue while one writer holds the commit lock, and busy\_timeout makes the writer wait briefly instead of failing immediately. They also split long read transactions so they no longer block checkpoints.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-11T22:26:15.864982+00:00— report_created — created