Earlier quoted context omitted.
They tell you to use a proper FS, which is largely orthogonal to containerization.
WAL relies on shared memory, so while a proper FS is necessary, it isn't going to help in this case.
SQLite in Production: Lessons from Running a Store on a Single File
71–80 of 135 posts
Re: SQLite in Production: Lessons from Running a Store on a Single File
#72Earlier quoted context omitted.
It's a spectrum. Installing Postgres locally is not 100% future-proofing since you'll still need to migrate your local Postgres to a central Postres. Using Sqlite is not 0% future-proofing since it's still using the SQL standard. If the only argument for a piece of tech in comparison to another one is "future-proofing", that's pretty much acknowledging the other one is simpler to setup and maintain.
> It's a spectrum. For web servers specifically, no, SQLite is not generally part of that spectrum. That makes as much sense as saying that in a kitchen, you want a spectrum of knives from Swiss Army Knives to chef's knives. No -- Swiss Army Knives are not part of the spectrum. For web servers, you do have a wide spectrum of database options from single servers to clusters to multi-region clusters, along with many ot…
Re: SQLite in Production: Lessons from Running a Store on a Single File
#73Re: SQLite in Production: Lessons from Running a Store on a Single File
#74Re: SQLite in Production: Lessons from Running a Store on a Single File
#75Re: SQLite in Production: Lessons from Running a Store on a Single File
#76Re: SQLite in Production: Lessons from Running a Store on a Single File
#77Earlier quoted context omitted.
This is the actual problem: "Kamal runs blue-green deploys — it starts a new container, health-checks it, then stops the old one. During the switchover, both containers are running. Both mount ultrathink_storage. Both have the SQLite files open." WAL mode requires shared access to System V IPC mapped memory. This is unlikely to work across containers. In case anybody needs a refresher: https://en.wikipedia.org/wiki/S…
The SQLite documentation says in strong terms not to do this. https://sqlite.org/howtocorrupt.html#_filesystems_with_broke... See more: https://sqlite.org/wal.html#concurrency
Re: SQLite in Production: Lessons from Running a Store on a Single File
#78> The technical fix was embarrassingly simple: stop pushing to main every ten minutes. Wait, you push straight to main? > We added a rule — batch related changes, avoid rapid-fire pushes. It's in our CLAUDE.md (the governance file that all our AI agents follow): > Avoid rapid-fire pushes to main — 11 pushes in 2h caused overlapping Kamal deploys with concurrent SQLite access. Wait, you let _Claude_ push your e-commer…
Yikes. Thank you I'm not going to read “Lessons learned” by someone this careless.
Re: SQLite in Production: Lessons from Running a Store on a Single File
#79Re: SQLite in Production: Lessons from Running a Store on a Single File
#80The LLM prose are grating read. I promise, you'd do a better job yourself.