November 1, 2025
Lock wars: devs vs defaults
SQLite concurrency and why you should care about it
Jellyfin hits weird lockups; fans split between tweak-it fixes and 'SQLite did nothing wrong'
TLDR: Jellyfin explains rare “database locked” crashes in SQLite and proposes extra locking, while commenters argue it’s mostly about better settings like timeouts and sane defaults. The thread splits between “configure it right” and “don’t misstate SQLite,” with hopeful buzz around the upcoming high‑concurrency hctree.
Jellyfin just published a deep dive on why its media server sometimes face-plants with mysterious “database locked” errors, and the comment section turned into a full-on lock war. The post explains that SQLite, the tiny database in one file, can choke when too many things try to write at once—even with the Write-Ahead Log (a side file that queues changes). Jellyfin says they’re rolling their own extra locking and invites other apps to copy it. The crowd? Not shy.
The boldest chorus says the bug isn’t magic—set a “busy timeout” (a wait period before giving up) and understand how transactions work. One veteran called out SQLite’s “awful defaults,” claiming you need a handful of settings—aka PRAGMAs—to make it behave. Another commenter flatly fact-checked the blog’s “single app” vibe: you can have many processes use SQLite, they insist, just not more than one writer at the same time. Meanwhile, hype train approaching: folks are drooling over SQLite’s experimental “hctree” (the “high concurrency” revamp), promising smoother parallel work once it’s stable, with a cheeky “lol!” for spice. Even a side-quest popped up: someone trying to do parallel Python writes while farming sentence examples from ChatGPT. Verdict: drama, dad jokes, and database diplomacy, all in one file. See the hctree tease here.
Key Points
- •SQLite’s design imposes single-writer constraints, impacting concurrency within applications.
- •WAL mode allows parallel writes via a journal but does not eliminate all locking conflicts.
- •Transactions can block readers and, on some Jellyfin systems, trigger database locked errors leading to crashes instead of waiting.
- •The locking issue is intermittent and occurs across OS types, storage speeds, and virtualization, with no clear contributing factors identified.
- •Jellyfin implemented application-level SQLite locking and suggests the approach is easy to adopt in other EF Core apps.