Repository navigation
qBittorrent-nox CPU pinned at 100%; disappears immediately when qui is stopped #1526
Replies: 4 comments
|
Seeing this as well with qui v1.23.0 and qBittorrent v5.2.3 with 5k+ torrents. Checking |
Agent BriefCategory: bug Current behavior:
Desired behavior:
Key interfaces:
Acceptance criteria:
Out of scope:
Why a human: the polling cadence is a product tradeoff between UI liveness and load on qBittorrent, whether the knob is automatic or a user setting is a scope call, and the result can only be judged by hand on a large real instance. On what is and is not confirmed: the mechanism is confirmed in the code. qui holds a 2-second |
|
Another data point, and it points away from the SSE loop: the load I measured happens with no browser tab open anywhere. Setup: qBittorrent 5.2.3, WebAPI 2.15.1, 796 torrents, qBittorrent's main thread still sat between 4.4% and 8.0% of a core, continuously, measured in 20-second windows. Traffic from qBittorrent to qui arrived in bursts with a period of 7.0 seconds. The only 7-second constant in the tree is torrents, err = client.GetTorrentsCtx(ctx, qbt.TorrentFilterOptions{
Filter: qbt.TorrentFilterStalled,
IncludeTrackers: true,
})Measured straight against the WebAPI on this instance:
Two things collide there.
373 ms every 7.0 seconds is 5.3% of a core, which matches what I measured. qBittorrent serves it on the single thread that also answers the WebUI and the *arr clients, so everything else waits behind it. That is the symptom people notice first, and it sends you looking at your network and your trackers, where nothing is wrong. Here is the part that made me write this up. My reannounce row was: and // If MonitorAll is false and no inclusion criteria are provided, we match nothing.So the scan was pulling 4.8 MB out of qBittorrent 12,343 times a day and discarding every byte of it. I never configured reannounce; that row is whatever the default write left behind. Turning it off took the main thread from 4.4-8.0% down to 0.0-0.1%. Two suggestions, in the order I would rank them:
On versions, offered as correlation and not as a diagnosis, since I did not observe the mechanism. On v1.26.0 this same instance ran qBittorrent's main thread at 91.6% of a core on average for 38 hours straight. That is from One note on measuring this, because it cost me an hour. |
The reannounce scan finding is a separate bug from the sync cadence in the brief above. Tracked in #2490. |
Uh oh!
There was an error while loading. Please reload this page.
Description
After running for a few minutes to ~30 minutes, qbittorrent-nox pins one core at 100% indefinitely. WebUI becomes unresponsive, trackers stop updating, only fix is restarting qBittorrent.
I used pidstat -t to identify a single anonymous thread responsible for the 100%. Attaching strace to it captured zero syscalls, so it's a pure userspace loop.
The interesting part: when I stop qui AND restart qBittorrent, it stays stable. As soon as qui is running again, the issue comes back within minutes to half an hour. qBittorrent alone stays fine.
My suspicion is the /sync/maindata polling. There's a related older qBittorrent issue (#10999) where that endpoint was found to be significantly slower and more CPU-intensive than /torrents/info, particularly with large collections. My situation may not be directly comparable (different scale, different hardware), but qui polling every 30s could still be enough to trigger something. There's also a separate Docker-specific qBittorrent bug (#23384) with libtorrent 2.0.11 showing similar symptoms, though the strong correlation with qui makes me think it's not just that.
Nothing unusual in Qbitorrent's logs.
Steps to reproduce
Environment
Relevant logs
No response
Checklist
All reactions