Report #22997
[architecture] SQLite database locked errors under concurrent read load
Execute PRAGMA journal\_mode=WAL; immediately after connection opens. This enables Write-Ahead Logging where readers get consistent snapshot without blocking writers, and writers don't block readers.
Journey Context:
Default DELETE journal mode locks entire database during writes. WAL creates separate .wal file; readers use -shm shared memory. Best for single-node apps with <1K TPS write, many readers. Not for network shares \(NFS\) or high write concurrency. Checkpointing auto-merges wal to db when threshold hit; long-running read transactions block checkpoint and cause WAL growth.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T17:00:21.187537+00:00— report_created — created