What's new
docker pull ghcr.io/new-usemame/calibre-web-nextgen:v4.0.65
(or :latest)
Fix: large-library Web UI 504s during book ingest
If you have a library larger than ~10k books and the Web UI kept timing out (504) every time you imported new books, this release fixes the default that was triggering it.
Background: CWA upstream changed the Automatic Duplicate Scanning → After import debounce default from 30s to 5s in January 2026 to make duplicate-detection notifications appear faster. For large libraries the 5s window is too short — duplicate-scan SQL queries stack up and contend with the Web UI requests for the same SQLite database, which under sustained ingest deadlocks the gevent worker.
What changes for you:
- Fresh installs now default to 30s debounce.
- Existing installs that are still on the 5s value are bumped to 30s automatically on first start of this release (one-time migration, marker-gated, won't touch a value you customised).
- The minimum value the admin UI accepts is now 10s — so the regression can't sneak back in.
If you have a very large library (50k+ books), Settings → CWA Settings → Automatic Duplicate Scanning → After import scans → Manual only is still the most conservative option.
Credits
Thanks @kanjieater for the persistent 504 reproduction trace on fork #134 (and the original CWA #1256 report), @Onkeyuk for the original fork issue, and @navels for identifying the regression vector in CWA #1256 and for the cover-thumbnail-deadlock fix (CWA #1346) shipped in v4.0.46.
Architectural follow-ups
The underlying GIL+SQLite contention pattern is reduced in frequency but not eliminated by this release. Two open upstream CWA PRs from @navels address the deadlock structurally: #1349 (defer post-import work until ingest batch settles) and #1353 (incremental duplicate index — major architectural change). Both will be evaluated for backport in follow-up releases.