April 4, 2026
Single-file store, double-charge drama
SQLite in Production: Lessons from Running a Store on a Single File
Two orders vanished; commenters roast “push to main” and ask why not Postgres
TLDR: A real shop lost two orders when overlapping deployments clashed on its single-file SQLite database; they slowed releases to fix it. Commenters roasted “push to main,” pushed canary and Postgres, and joked about AI playbooks—splitting between “SQLite is fine, fix your pipeline” and “use bigger tools.”
An online store ran a real e‑commerce site on a single-file SQLite database and it mostly rocked—until two paid orders disappeared during a rapid‑fire deploy spree. The fix? “Stop pushing to main every ten minutes.” Cue the comments section turning into a tech reality show. The loudest reaction: shock and roast. “Wait, you push straight to main?” asked one stunned reader, while another mocked the reliance on an AI playbook to behave: please pretty-please follow the rules. The enterprise crowd rolled in waving “grown‑up database” flags: canary releases, load balancers, and “just use Postgres already.” One commenter flexed with a calm “we send 5% of traffic to canary and then roll out,” turning the whole thread into DevOps show-and-tell. Meanwhile, pragmatists defended SQLite: the issue was overlapping blue‑green deploys, not the database. Some dropped nerdy gems about JSON types and casting, and others shared practical backup tips—like simple file copies and tools like gobackup. The memes wrote themselves: “pushing to main speedrun,” “orders 16 and 17 went to the great WAL beyond,” and “DevOps by vibes.” Underneath the jokes, the split is clear: SQLite can work great for small-to-medium traffic, but deployment discipline matters. Single file, many feelings—welcome to tech Twitter’s favorite battlefield.
Key Points
- •A production e‑commerce store runs entirely on SQLite under Rails 8, using four databases (primary, cache, queue, cable) on a shared Docker volume.
- •Rails 8 enables WAL mode by default; with a 5‑second write timeout, read‑heavy workloads ran without contention in normal operation.
- •Frequent deploys (11 pushes in 2 hours) caused overlapping blue‑green deployments, leading to multiple containers accessing the same WAL files concurrently.
- •Two orders were charged successfully in Stripe but their database records were lost; sqlite_sequence showed IDs assigned without corresponding rows.
- •The fix was to reduce deploy frequency by batching changes to avoid overlapping deploy windows; the issue was attributed to deployment pipeline behavior with the shared SQLite setup.