qBittorrent
qBittorrent copied to clipboard
Large torrent disapper after restarting qBittorrent
qBittorrent & operating system versions
qBittorrent: 4.4.3.1 x64 Operaing system: Win10 Pro (10.0.1xxxx), and Docker on Linux QT: 6.3 Libtorrent: 2.0.6.0
What is the problem?
I have a large torrent file, and this problem occurs on both my win10 PC and Docker on linux server every time.
If I restart qbittorrent, the torrent will disapper and get a error message "Unable to resume torrent '5bc1fd5b184d540ca3eac9f32c453368ab563f8f'." I tried several times and found that it doesn't even need to start the download, Just add the torrent and restart qbittorrent.
I found the files in BT_backup, I don't know if it's because these files are too big that causes this problem 5bc1fd5b184d540ca3eac9f32c453368ab563f8f.fastresume 37,066 KB 5bc1fd5b184d540ca3eac9f32c453368ab563f8f.torrent 46,037 KB
And I also tried to increase the Physical Memory Usage Limit to 4096MB, this still doesn't work.
Finally, I tried other versions from the qbittorrent official website on my win10 PC, here is the result, Both 4.4.x versions are faild, and only 4.3.9 version has no problem.
Fail [4.4.3.1] qBittorrent Windows x64 Fail [4.4.3.1] qBittorrent Windows x64 (qt6) Fail [4.4.3.1] qBittorrent Windows x64 (qt5 RC_1_2) Fail [4.4.3.1] qBittorrent Windows x64 (qt6 RC_1_2) Fail [v4.4.2] qBittorrent Windows x64 Fail [v4.4.1] qBittorrent Windows x64 Fail [v4.4.0] qBittorrent Windows x64 Success [v4.3.9] qBittorrent Windows x64
Steps to reproduce
- just add the torrent, and do not need to start the download.
- restart qBittorrent.
Additional context
I don't know if I should provide the torrent file, if so, here is the link https://mega.nz/folder/U4wXjAqR#0Qs7BJlHZcqcmE1XE5N8Tw/file/g9h0nByR The torrent is Assets.torrent
Log(s) & preferences file(s)
(N) 2022-08-20T01:32:00 - qBittorrent v4.4.3.1 started (N) 2022-08-20T01:32:00 - Using config directory: C:/Users/admin/AppData/Roaming/qBittorrent (I) 2022-08-20T01:32:00 - Trying to listen on: 0.0.0.0:22438,[::]:22438 (N) 2022-08-20T01:32:00 - Peer ID: -qB4431- (N) 2022-08-20T01:32:00 - HTTP User-Agent is 'qBittorrent/4.4.3.1' (I) 2022-08-20T01:32:00 - DHT support [ON] (I) 2022-08-20T01:32:00 - Local Peer Discovery support [ON] (I) 2022-08-20T01:32:00 - PeX support [ON] (I) 2022-08-20T01:32:00 - Anonymous mode [OFF] (I) 2022-08-20T01:32:00 - Encryption support [ON] (I) 2022-08-20T01:32:00 - UPnP / NAT-PMP support [ON] (I) 2022-08-20T01:32:01 - IP geolocation database loaded. Type: DBIP-Country-Lite. Build time: Mon Aug 1 08:36:07 2022. (N) 2022-08-20T01:32:01 - Using built-in Web UI. (N) 2022-08-20T01:32:01 - Web UI translation for selected locale (en) has been successfully loaded. (N) 2022-08-20T01:32:01 - Web UI: Now listening on IP: *, port: 8080 (C) 2022-08-20T01:32:01 - Unable to resume torrent '5bc1fd5b184d540ca3eac9f32c453368ab563f8f'. (I) 2022-08-20T01:32:01 - Successfully listening on IP: 192.168.97.131, port: TCP/22571 (I) 2022-08-20T01:32:01 - Successfully listening on IP: 192.168.97.131, port: UTP/22571
@glassez just tried the above .torrent
with PR https://github.com/qbittorrent/qBittorrent/pull/17576
19/08/2022 22:02 - Failed to resume torrent. Torrent: "5bc1fd5b184d540ca3eac9f32c453368ab563f8f". Reason: "Cannot parse resume data: bencoded item count limit exceeded"
Edit: BTW, tested both builds (1.2.17/2.0.7) - same log message.
Edit 2: Relevant?! https://github.com/arvidn/libtorrent/issues/6467
My hacky fix (during build):
sed -i -e '/bdecode/s/data, ec/data, ec, nullptr, 100, 20000000/g' \
qbittorrent-git/src/base/bittorrent/bencoderesumedatastorage.cpp
It sets 'bencoded item count limit' to 10 times default (and 2 times that for loading torrents).
I had the same issue https://github.com/qbittorrent/qBittorrent/issues/19088 can you pull request the fix above?
and 2 times that for loading torrents
That part especially.
This appears to be an issue still as of 4.5.4. I'm primarily a windows user of qbittorrent, so the proposed fix is a bit out of reach for me. It seems as though these values are not exposed in the advanced section, but perhaps they should be?
Certainly this is a bit of an edge case. I'm sure there's a reason for the limiting defaults. I assume security.
There seems to be no other remedy than re-adding the torrent and rechecking it every time, which given the issue is related to size, a recheck is extremely time consuming. For me its many hours.
I'd be willing to compile my own fix as proposed above, but is anyone aware of a way to transfer all the existing torrents in an automated-ish way? I have 826 currently and would very much like to continue seeding them.
I'd be willing to compile my own fix as proposed above, but is anyone aware of a way to transfer all the existing torrents in an automated-ish way? I have 826 currently and would very much like to continue seeding them.
I honestly don't know how to compile something like this on windows other than using MSYS2 (which ironically doesn't work on linux/wine). How many of 826 torrents are over the limit? You would need manually add only those. I'd backup relevant AppData folders before reinstalling qBittorrent, just in case.
I honestly don't know how to compile something like this on windows other than using MSYS2 (which ironically doesn't work on linux/wine). How many of 826 torrents are over the limit? You would need manually add only those. I'd backup relevant AppData folders before reinstalling qBittorrent, just in case.
I didnt explain my config, sorry.
My plan was to actually compile the linux version using your changes. Currently my setup is a windows VM with PIA and qbittorrent. I already download and seed from a NAS where the VM is hosted. I had considered moving to a containerized version of qbittorrent initially but it seems like this wouldnt solve anything anyway and the logistics of forwarding for PIA are fuzzy to me. I could run the same-ish setup with linux, I'm just not sure about transferring the torrents to the new guest without manually copying down every magnet/torrent to then import them.
I have a single torrent I have created that caused me to go digging. Its about 1.7tb and 185k files. This has been the first sign of heartache and I'm not exactly certain what the issue with it is.
My plan was to actually compile the linux version using your changes. Currently my setup is a windows VM with PIA and qbittorrent. I already download and seed from a NAS where the VM is hosted. I had considered moving to a containerized version of qbittorrent initially but it seems like this wouldnt solve anything anyway and the logistics of forwarding for PIA are fuzzy to me. I could run the same-ish setup with linux, I'm just not sure about transferring the torrents to the new guest without manually copying down every magnet/torrent to then import them.
Well, you could run two instances of qBittorrent, or you could try to use sed to replace file paths in fastresume files. Something like this (NOT tested):
sed -i -e 's/9:C:\\files\\/7:\/files\//g' *.fastresume
Number before ':' is a path length in bytes (so for non-ASCII characters its a bit harder to guess)
Edit: sed doesn't really work on binary files, instead there is bbe or perl -i -g -pe 's/some/thing/g' filename
Edit2: tested perl version, it works. Just remember that '\' in path translates to '\\\\' in command line, and '/' to '\\/'.
This issue can already be closed.
Yay, I can confirm #19088 is fixed!