Report #15661
[architecture] When SQLite outperforms Postgres for production web services
Enable WAL mode \(PRAGMA journal\_mode=WAL\) with busy\_timeout=5000ms, use a single writer process with read-heavy replicas or connection pooling limited to 1 write connection, and ensure working set fits in RAM.
Journey Context:
Engineers dismiss SQLite as 'toy databases' because they use the legacy rollback journal mode, which locks the entire database on writes. The breakthrough is Write-Ahead Logging \(WAL\), which allows concurrent reads during writes and dramatically improves concurrency. For single-node deployments with <1000 TPS and read-heavy workloads, SQLite with WAL mode eliminates network latency and operational complexity of Postgres while maintaining ACID compliance. The failure mode is ignoring busy\_timeout, causing SQLITE\_BUSY errors under write load.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:44:28.147048+00:00— report_created — created