Describe the bug
With a large backlog of COMPLETED transfers on put.io (~100+), putioarr stops downloading after a (re)start. The monitor loop queues the transfers (ready for download logged for all of them), a handful of orchestration workers log download started and generating targets, and then nothing — no downloads, no imports, indefinitely. A restart only clears it until the backlog rebuilds.
Key evidence — the process is parked, not busy
While stuck, the container is essentially idle:
- CPU ~0.15%, RSS ~6 MiB,
RestartCount=0, not OOM-killed
- only ~7 open file descriptors (fd limit is 1M) → no in-flight HTTP requests / sockets
download_workers worth of transfers log generating targets and then produce no further log
So the workers are parked on an .await (a lock or channel), not spinning and not resource-exhausted. put.io itself is healthy at the time (a manual files/list returns in ~0.4s), so it is not put.io latency.
generating targets is the first line of get_download_targets; the next thing it does is state.get_download_dir_for_transfer() (a tokio::sync::RwLock read) before any HTTP call — consistent with the tasks parking there (no socket opened, matching the ~7 fds).
Reproduction
Run putioarr against a large Sonarr/Radarr library so ~100+ transfers complete on put.io, then restart. After the resume scan finishes, downloads never start.
Notes
I have separate PRs adding request timeouts and a shared put.io client (#32/#33) and bounding the import watcher (#30/#31); none of them resolve this, which is consistent with it being a lock/channel coordination issue rather than a hung request. Happy to add instrumentation/logging if that would help pin down where the workers park.
Describe the bug
With a large backlog of
COMPLETEDtransfers on put.io (~100+), putioarr stops downloading after a (re)start. The monitor loop queues the transfers (ready for downloadlogged for all of them), a handful of orchestration workers logdownload startedandgenerating targets, and then nothing — no downloads, no imports, indefinitely. A restart only clears it until the backlog rebuilds.Key evidence — the process is parked, not busy
While stuck, the container is essentially idle:
RestartCount=0, not OOM-killeddownload_workersworth of transfers loggenerating targetsand then produce no further logSo the workers are parked on an
.await(a lock or channel), not spinning and not resource-exhausted. put.io itself is healthy at the time (a manualfiles/listreturns in ~0.4s), so it is not put.io latency.generating targetsis the first line ofget_download_targets; the next thing it does isstate.get_download_dir_for_transfer()(atokio::sync::RwLockread) before any HTTP call — consistent with the tasks parking there (no socket opened, matching the ~7 fds).Reproduction
Run putioarr against a large Sonarr/Radarr library so ~100+ transfers complete on put.io, then restart. After the resume scan finishes, downloads never start.
Notes
I have separate PRs adding request timeouts and a shared put.io client (#32/#33) and bounding the import watcher (#30/#31); none of them resolve this, which is consistent with it being a lock/channel coordination issue rather than a hung request. Happy to add instrumentation/logging if that would help pin down where the workers park.