github new-usemame/Calibre-Web-NextGen v4.0.87
v4.0.87 — Duplicates page no longer crashes on big libraries

latest releases: v4.0.94, v4.0.93, v4.0.92...
4 hours ago

What's new

docker pull ghcr.io/new-usemame/calibre-web-nextgen:v4.0.87

(or :latest)

Duplicate scan now survives large libraries

If your library is big enough that the duplicate prefilter flags more than ~32,000 candidate books, the duplicate scan used to die with sqlite3.OperationalError: too many SQL variables. The container would flip to unhealthy, the after-import cache refresh would fail with the same error, and every subsequent import would fall back to a near-full Python scan in the in-process worker — holding the GIL and starving the web server. Self-perpetuating.

The duplicate scan now splits the lookup into 900-id batches, well under SQLite's bound-parameter limit (this stays safe even on pre-3.32 SQLite where the limit is 999). Verified against a synthetic 170,231-id payload on real SQLite — the unchunked path reproduces the production error, the chunked path completes in 0.58s clean.

If you'd already worked around this by setting cwa_settings.duplicate_scan_frequency = manual, you can flip it back to automatic on v4.0.87.

Credits

This is a backport of the first two commits of @FRaccie's downstream FRaccie/Calibre-Web-NextGen#1 — production diagnosis on a real ~200k-book library + the chunked-IN + timezone-safe-sort implementation. Originally reported in fork #193.

Don't miss a new Calibre-Web-NextGen release

NewReleases is sending notifications on new releases.