Writes are timing out under load
The application is in DELETE journal mode, or many writers are competing for the same file through short-lived connections.
WAL mode on, writes serialised cleanly
Working with SQLite?
SQLite is quiet and fast until the day the file is locked, the disk is full, or a shutdown leaves the database malformed. We find what the engine is actually complaining about and fix that, with your data intact.
What it is
SQLite is an embedded SQL database written in C by D. Richard Hipp and first released in August 2000. The whole engine lives inside the application that uses it, so there is no separate server process to install or run. The entire database sits in one ordinary file on disk.
It is public domain and almost certainly the most widely deployed database in the world. Every iOS and Android device ships with it, every major browser uses it, macOS relies on it, and the Python standard library includes it. Countless embedded systems and desktop tools keep their state in a SQLite file without the user ever knowing.
The WAL journal mode that landed in 2010 made concurrent readers and a single writer work cleanly together, which pushed SQLite into far more serious production use. Current releases are in the 3.46 series. Companion projects fill in the gaps: Litestream streams the database to object storage for near continuous backup, rqlite wraps it in Raft for distributed consensus, and LiteFS from Fly.io replicates it across a cluster.
The honest version
No technology is all upside. This is where SQLite earns its place and where it tends to cause trouble.
Sound familiar?
The SQLite problems that bring people to us, and what you have once each one is fixed.
The application is in DELETE journal mode, or many writers are competing for the same file through short-lived connections.
WAL mode on, writes serialised cleanly
A power cut, a kill on the writer, or a database stored on a network mount that lies about fsync.
Recovered where possible, moved off the bad surface
WAL and temporary files growing without bound, or an application that never checkpoints under pressure.
Space reclaimed, checkpoints tuned
A cron job that copies the raw file while writes are still happening, so half the backups fail to open.
Online backups that actually restore
The streaming replica stalled behind the primary, often because of credentials, clock drift, or object storage limits, and nobody noticed.
Replication caught up and monitored
A missing index on a column that only started mattering once the table grew, or ANALYZE that has never been run.
Indexed and measured
A migration that worked in the office but fails on real devices with older data in them.
Migrations tested against real data
The database file is on a network filesystem whose locking is not reliable, so SQLite protections quietly fail.
Moved to local disk, replicated off-box
What we do
Call us for one locked database, or hand us the whole stack.
How it works
Tell us what's going wrong. We look at it, then tell you plainly what's wrong and what it will cost.
We fix the cause, not the symptom. If something is down, getting it back up comes first.
Backups, monitoring, updates and access, so the same problem can't quietly come back.
You get a plain-language write-up. Or we stay on for hosting, upkeep and new work.
Often found together
We work on the whole stack, so the problem can be wherever it actually is.
For the right workload it is a sound choice in production. Single-node apps with modest write concurrency run on SQLite for years without drama, especially paired with Litestream for backup and read replicas. Where it struggles is high-concurrency multi-writer web apps, and that is where it is worth considering Postgres or MySQL instead.
In most cases some or all of the data can be recovered. The .recover command in a recent SQLite build extracts what it can from a malformed file, and the integrity_check pragma reports exactly what is wrong. The important thing is not to overwrite or reinitialise the file before someone has looked at it.
The common cause is running in the default DELETE journal mode while several writers share the file. Turning on WAL mode and a sensible busy_timeout clears up most of these cases. Writes placed on a network filesystem or inside a container with a slow bind mount are the other usual suspects.
Yes, and we do it in both directions regularly. We map the schema, convert the data, retest the application against the new engine, and run the two side by side long enough to be confident before switching the traffic over.
Yes, that is a common piece of work for us. We put Litestream in front of the database, point it at S3 compatible storage, and verify that a restore actually produces a working database. After that you get continuous backup and the option of read replicas, without changing the application.
Estimates are free. Hand us the database file or a schema export, and we come back with a quote before anything on your end is changed.
Free estimate
Tell us what you're running and what's going wrong. A person reads it and comes back with an estimate.
Your message is with a real person, and we'll get back to you soon.
Rather talk now? Call us: