github new-usemame/Calibre-Web-NextGen v4.0.15
v4.0.15 — fix infinite ingestion loop on NFS / polling-watcher deployments

latest releases: v4.0.172, v4.0.171, v4.0.170...
one month ago

Bug fix release

Fixes upstream Calibre-Web-Automated#1326 — infinite ingestion loop on NFS-backed libraries and any other deployment using the polling watcher fallback.

Affected setups

If you run any of the following, this release fixes runaway ingest retries that lock up the UI:

  • `NETWORK_SHARE_MODE=true` (NFS / SMB libraries)
  • `CWA_WATCH_MODE=poll` (manual polling-watcher opt-in)
  • Docker Desktop on macOS or Windows (auto-detected)
  • Linux hosts where inotify hits `max_user_watches` ENOSPC (auto-detected fallback)

Root cause

`scripts/watch_fallback.py` was re-emitting `CLOSE_WRITE` events for the same file on every poll cycle. The "already-fired" sentinel was being bypassed by an mtime-age fallback in the same condition, so any file older than ~1.5 seconds kept queueing fresh ingest attempts every 5 seconds while the ingest processor was still working — flooding the queue with stale retries.

Fix

#52 (commit 8a3a424) — gates the emit decision on the sentinel directly, refactors the inline scan loop into a unit-testable `scan_once` function, and adds 5 regression tests including a 50-cycle stress check.

Drop-in upgrade

```
docker pull ghcr.io/new-usemame/calibre-web-nextgen:latest
```

Same compose file shape as upstream Calibre-Web-Automated and prior NextGen releases — swap the image, restart.

Credits

Reporter: @mysterfr on upstream issue #1326.

Verifying the image

Multi-arch (linux/amd64 + linux/arm64), cosign keyless-signed, with SLSA build provenance attestation. Pinned digest is in the release asset.

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

NewReleases is sending notifications on new releases.