Report #7256
[architecture] SQLite rejected for web concurrency due to legacy lock-mode assumptions
Enable WAL \(Write-Ahead Logging\) mode \(PRAGMA journal\_mode=WAL\) and set a busy timeout \(PRAGMA busy\_timeout=5000\). This allows readers to not block writers and writers to not block readers, making SQLite viable for read-heavy web workloads with <1000 TPS.
Journey Context:
Developers default to Postgres for web apps, assuming SQLite locks the entire database during writes. In the default DELETE journal mode, this is true: a write locks the file, blocking readers. However, WAL mode implements MVCC-like behavior where writes append to a separate WAL file, allowing concurrent reads of the last consistent snapshot. Combined with busy\_timeout to handle transient lock conflicts, SQLite achieves concurrency comparable to file-system limits. The tradeoff is that WAL requires shared-memory primitives \(Unix shared memory or Windows memory-mapped files\), making it unsuitable for certain containerized/NFS scenarios, but perfect for single-node web apps, edge functions, and embedded devices.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T02:14:22.388726+00:00— report_created — created