qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
26.95k stars 3.88k forks source link

Torrent queue limit counting stuck 'Downloading metadata' as active #15135

Open tedwin78gh opened 3 years ago

tedwin78gh commented 3 years ago

Bug report

Checklist

Description

qBittorrent info and operating system(s)

If on Linux, libtorrent-rasterbar and Qt versions

What is the problem

Torrent added via magnet link with status stuck at 'Downloading metadata' is counted towards 'Maximum active downloads' in 'Torrent Queuing'. If you set 'Do not count slow torrents in these limits' then it is counted towards 'Maximum active torrents'.

Detailed steps to reproduce the problem

  1. Add 2 not healthy torrent via magnet link (hard to find or obscure torrent or dead)
  2. Add a healthy torrent
  3. Adjust the active downloads queue limit to 1 and active queue limit to 2. See that the first torrent stuck at 'Downloading metadata' and the remaining 2 torrent is in queue. Screenshot 2021-06-28 100056 - Step 3
  4. Check 'Do not count slow torrents in these limits'. See that the first TWO torrent stuck at 'Downloading metadata' and the third healthy torrent is in queue. Screenshot 2021-06-28 100816 - Step 4

What is the expected behavior

Torrent stuck at 'Downloading metadata' should not be counted as 'active torrent'

Extra info (if any)

(type here)

Attachments

Click [SpeedWidget] graph_enable_7=false graph_enable_0=true graph_enable_4=false graph_enable_2=false graph_enable_1=true graph_enable_5=false graph_enable_6=false period=1 graph_enable_3=false Enabled=true graph_enable_9=false graph_enable_8=false [Application] FileLogger\Age=6 FileLogger\DeleteOld=true FileLogger\Backup=true FileLogger\AgeType=1 FileLogger\Enabled=true FileLogger\MaxSizeBytes=66560 FileLogger\Path=C:/Users/tedwi/AppData/Local/qBittorrent/logs [ShutdownConfirmDlg] DontConfirmAutoExit=false [Preferences] Advanced\updateCheck=true Advanced\EnableIconsInMenus=true Connection\ResolvePeerCountries=true General\HideZeroComboValues=0 General\NoSplashScreen=true MailNotification\sender=qBittorrent_notification@example.com MailNotification\password= Scheduler\end_time=@Variant(\0\0\0\xf\x4J\xa2\0) Downloads\TorrentExportDir=C:/Temp Connection\alt_speeds_on=false General\CloseToTray=true Advanced\IncludeOverhead=true Queueing\IgnoreSlowTorrents=true Connection\ResolvePeerHostNames=false Queueing\MaxActiveTorrents=2 General\CloseToTrayNotified=true MailNotification\username= MailNotification\email= MailNotification\req_auth=false Queueing\MaxActiveUploads=7 General\Locale=en Downloads\FinishedTorrentExportDir=C:/Temp/Done Advanced\trackerPort=9000 Advanced\RecheckOnCompletion=false Scheduler\start_time=@Variant(\0\0\0\xf\x1\xb7t\0) General\AlternatingRowColors=true General\PreventFromSuspendWhenDownloading=false Scheduler\days=0 Advanced\confirmTorrentRecheck=true MailNotification\req_ssl=false General\HideZeroValues=false General\PreventFromSuspendWhenSeeding=false Search\SearchEnabled=true General\ExitConfirm=true Downloads\TempPathEnabled=true General\UseCustomUITheme=false Downloads\DblClOnTorFn=1 General\UseRandomPort=true Advanced\confirmRemoveAllTags=true Connection\GlobalUPLimitAlt=200 MailNotification\smtp_server=smtp.changeme.com Advanced\DisableRecursiveDownload=false Connection\PortRangeMin=62722 General\StartMinimized=false WebUI\Enabled=false General\CustomUIThemePath= Advanced\TrayIconStyle=0 General\SystrayEnabled=true Advanced\confirmTorrentDeletion=true Downloads\SavePath=C:/Temp/Done/ Connection\GlobalDLLimitAlt=2000 Downloads\DblClOnTorDl=0 MailNotification\enabled=false Downloads\NewAdditionDialog=true Downloads\NewAdditionDialogFront=true Queueing\QueueingEnabled=true Queueing\MaxActiveDownloads=1 General\MinimizeToTray=false Downloads\TempPath=C:/Temp/ [TorrentProperties] CurrentTab=2 Peers\qt5\PeerListState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\x1\0\0\0\x6\x1\0\0\0\0\0\0\0\0\0\0\0\xe\0 \0\0\0\x1\0\0\0\r\0\0\0\x64\0\0\x5\x14\0\0\0\xe\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\xe\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\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0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\0\0\0\x64) Visible=true [TransferListFilters] selectedFilterIndex=0 [GUI] DownloadTrackerFavicon=false Log\Enabled=false Notifications\Enabled=true Notifications\TorrentAdded=false [DownloadFromURLDialog] Size=@Size(501 220) [AutoRun] enabled=false program= ConsoleEnabled=false [Core] AutoDeleteAddedTorrentFile=Never [LegalNotice] Accepted=true [MainWindow] qt5\vsplitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\0x\0\0\x1\xe6\x1\xff\xff\xff\xff\x1\0\0\0\x1\0) geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\xff\xff\xff\xff\xff\xff\xff\xf8\0\0\a\x80\0\0\x4\x38\xff\xff\xff\xff\0\0\0\xc8\0\0\aV\0\0\x2\xfa\0\0\0\0\x2\0\0\0\a\x80\0\0\0\0\0\0\0\x17\0\0\a\x7f\0\0\x4\x37) [AddNewTorrentDialog] DialogSize=@Size(880 565) RememberLastSavePath=false SplitterState=@ByteArray(\0\0\0\xff\0\0\0\x1\0\0\0\x2\0\0\x1\x30\0\0\x1\0\0\xff\xff\xff\xff\x1\0\0\0\x1\0) qt5\treeHeaderState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x6\x34\0\0\0\x3\0\0\0\x2\0\0\0\x64\0\0\0\x4\0\0\0\x64\0\0\0\x5\0\0\0\x64\0\0\x2\x9d\0\0\0\x6\x1\x1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\x64\xff\xff\xff\xff\0\0\0\x81\0\0\0\0\0\0\0\x6\0\0\x1\xd5\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\x64\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\x3\xe8\0\xff\xff\xff\xff) [RSS] AutoDownloader\DownloadRepacks=true AutoDownloader\SmartEpisodeFilter=s(\\d+)e(\\d+), (\\d+)x(\\d+), "(\\d{4}[.\\-]\\d{1,2}[.\\-]\\d{1,2})", "(\\d{1,2}[.\\-]\\d{1,2}[.\\-]\\d{4})" [SpeedLimitDialog] Size=@Size(481 272) [BitTorrent] Session\SlowTorrentsDownloadRate=5 Session\SlowTorrentsUploadRate=5 [TransferList] qt5\HeaderState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x1\0\0\0\0\0\0\0\0\x1\0\0\0\x1f\0\0\0\0\0\0\0\x1\0\0\0\x6\0\0\0\a\0\0\0\b\0\0\0\t\0\0\0\n\0\0\0\v\0\0\0\f\0\0\0\r\0\0\0\xe\0\0\0\xf\0\0\0\x11\0\0\0\x12\0\0\0\x16\0\0\0\x17\0\0\0\x18\0\0\0\x19\0\0\0\x1a\0\0\0\x3\0\0\0\x4\0\0\0\x1b\0\0\0\x1c\0\0\0\x5\0\0\0\x13\0\0\0\x1d\0\0\0\x2\0\0\0\x1e\0\0\0\x15\0\0\0\x14\0\0\0\x10\0\0\0\x1f\0\0\0\0\0\0\0\x1\0\0\0\x1a\0\0\0\x13\0\0\0\x14\0\0\0\x17\0\0\0\x2\0\0\0\x3\0\0\0\x4\0\0\0\x5\0\0\0\x6\0\0\0\a\0\0\0\b\0\0\0\t\0\0\0\n\0\0\0\v\0\0\0\x1e\0\0\0\f\0\0\0\r\0\0\0\x18\0\0\0\x1d\0\0\0\x1c\0\0\0\xe\0\0\0\xf\0\0\0\x10\0\0\0\x11\0\0\0\x12\0\0\0\x15\0\0\0\x16\0\0\0\x19\0\0\0\x1b\0\0\0\x1f\x80\0\x6\x7f\0\0\0\n\0\0\0\x15\0\0\0\x64\0\0\0\x16\0\0\0\x64\0\0\0\x10\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x64) [TorrentAdditionDlg] save_path_history=C:/Temp/Done, C:/Temp [AboutDialog] Size=@Size(545 295) [OptionsDialog] HorizontalSplitterSizes=121, 631 Size=@Size(779 591) (N) 2021-06-29T00:47:45 - qBittorrent v4.3.6 started (N) 2021-06-29T00:47:45 - Using config directory: C:/Users/tedwi/AppData/Roaming/qBittorrent/ (I) 2021-06-29T00:47:45 - Trying to listen on: 0.0.0.0:0,[::]:0 (N) 2021-06-29T00:47:45 - Peer ID: -qB4360- (N) 2021-06-29T00:47:45 - HTTP User-Agent is 'qBittorrent/4.3.6' (I) 2021-06-29T00:47:45 - DHT support [ON] (I) 2021-06-29T00:47:45 - Local Peer Discovery support [ON] (I) 2021-06-29T00:47:45 - PeX support [ON] (I) 2021-06-29T00:47:45 - Anonymous mode [OFF] (I) 2021-06-29T00:47:45 - Encryption support [ON] (I) 2021-06-29T00:47:45 - UPnP / NAT-PMP support [ON] (I) 2021-06-29T00:47:45 - IP geolocation database loaded. Type: DBIP-Country-Lite. Build time: Tue Jun 1 08:03:56 2021. (N) 2021-06-29T00:47:45 - Options were saved successfully. (I) 2021-06-29T00:47:45 - Successfully listening on IP: 192.168.56.1, port: TCP/55824 (I) 2021-06-29T00:47:45 - Successfully listening on IP: 192.168.56.1, port: UDP/55824 (I) 2021-06-29T00:47:45 - Successfully listening on IP: 192.168.1.104, port: TCP/55827 (I) 2021-06-29T00:47:45 - Successfully listening on IP: 192.168.1.104, port: UDP/55827 (I) 2021-06-29T00:47:45 - Successfully listening on IP: 127.0.0.1, port: TCP/55828 (I) 2021-06-29T00:47:45 - Successfully listening on IP: 127.0.0.1, port: UDP/55828 (I) 2021-06-29T00:47:45 - Successfully listening on IP: fe80::1153:ec33:ff18:239f%19, port: TCP/55829 (I) 2021-06-29T00:47:45 - Successfully listening on IP: fe80::1153:ec33:ff18:239f%19, port: UDP/55829 (I) 2021-06-29T00:47:45 - Successfully listening on IP: 2001:d08:d8:b8b3:aced:3421:e0ad:486b, port: TCP/55830 (I) 2021-06-29T00:47:45 - Successfully listening on IP: 2001:d08:d8:b8b3:aced:3421:e0ad:486b, port: UDP/55830 (I) 2021-06-29T00:47:45 - Successfully listening on IP: 2001:d08:d8:b8b3:b560:fe0c:67bb:5069, port: TCP/55831 (I) 2021-06-29T00:47:45 - Successfully listening on IP: 2001:d08:d8:b8b3:b560:fe0c:67bb:5069, port: UDP/55831 (I) 2021-06-29T00:47:45 - Successfully listening on IP: fe80::aced:3421:e0ad:486b%14, port: TCP/55832 (I) 2021-06-29T00:47:45 - Successfully listening on IP: fe80::aced:3421:e0ad:486b%14, port: UDP/55832 (I) 2021-06-29T00:47:45 - Successfully listening on IP: ::1, port: TCP/55833 (I) 2021-06-29T00:47:45 - Successfully listening on IP: ::1, port: UDP/55833 (I) 2021-06-29T00:47:45 - Successfully listening on IP: 2001:0:2851:fcb0:245f:8179:f13f:268d, port: TCP/55834 (I) 2021-06-29T00:47:45 - Successfully listening on IP: 2001:0:2851:fcb0:245f:8179:f13f:268d, port: UDP/55834 (I) 2021-06-29T00:47:45 - Successfully listening on IP: fe80::245f:8179:f13f:268d%17, port: TCP/55835 (I) 2021-06-29T00:47:45 - Successfully listening on IP: fe80::245f:8179:f13f:268d%17, port: UDP/55835 (I) 2021-06-29T00:47:45 - UPnP/NAT-PMP: Port mapping successful, message: successfully mapped port using UPnP. external port: TCP/55827 (I) 2021-06-29T00:47:45 - UPnP/NAT-PMP: Port mapping successful, message: successfully mapped port using UPnP. external port: UDP/55827 (N) 2021-06-29T00:47:45 - '4fe4fb1b6e230e6a618caea8d1194696ea86fcb6' restored. (N) 2021-06-29T00:47:45 - '7c4259e218647f6eb9738681b48b3febd0a3af0f' restored. (N) 2021-06-29T00:47:45 - 'ubuntu-21.04-desktop-amd64.iso' restored. (I) 2021-06-29T00:47:46 - Python detected, executable name: 'C:/Users/tedwi/AppData/Local/Programs/Python/Python38/python.exe', version: 3.8.5 (I) 2021-06-29T00:47:46 - Detected external IP: 14.192.217.114 (I) 2021-06-29T00:47:46 - Detected external IP: 2001:d08:d8:b8b3:aced:3421:e0ad:486b (I) 2021-06-29T00:47:46 - Detected external IP: 2001:d08:d8:b8b3:b560:fe0c:67bb:5069 (C) 2021-06-29T00:50:21 - UPnP/NAT-PMP: Port mapping failure, message: could not map port using UPnP: no router found (C) 2021-06-29T00:50:21 - UPnP/NAT-PMP: Port mapping failure, message: could not map port using UPnP: no router found (N) 2021-06-29T00:51:55 - Options were saved successfully. (I) 2021-06-29T00:52:01 - Detected external IP: 2001:0:2851:fcb0:245f:8179:f13f:268d (N) 2021-06-29T00:52:13 - Options were saved successfully. (N) 2021-06-29T00:52:25 - Options were saved successfully. (N) 2021-06-29T00:52:44 - Options were saved successfully.
FranciscoPombal commented 3 years ago

@tedwin78gh Please don't forget to attach the logs as well.

tedwin78gh commented 3 years ago

I have edited the post to include logs

sledgehammer999 commented 3 years ago

Do you wait more than 60seconds to see if the 3rd torrent starts downloading?

tedwin78gh commented 3 years ago

Waited more than that. The reason I found out is because everything is stopped behind those 'Downloading metadata' torrent. Now I have also notice that 'Stalled' torrent is also counted towards the limit, and slow torrent setting is not helping.

Should I edit the title once confirmed?

thalieht commented 3 years ago

Do you wait more than 60seconds to see if the 3rd torrent starts downloading?

The "Do not count slow torrents..." option is capped by Maximum active torrents in libtorrent so it won't start more than 2 in this case. It makes no sense to me for "Downloading metadata" torrents to occupy slots in the queue, ever, but there has to be someone who wants them to for whatever reason. @tedwin78gh you can "Force resume" any torrents to exempt them from the queue but FYI torrents in the state will also be exempt from the rechecking queue and will be rechecked in parallel with other torrents.

sledgehammer999 commented 3 years ago

Does it make sense for you to set the max active torrents to unlimited? (and only control the other 2 limits)

tedwin78gh commented 3 years ago

The "Do not count slow torrents..." option is capped by Maximum active torrents in libtorrent so it won't start more than 2 in this case.

Ok then this clears up on how these settings works.

It makes no sense to me for "Downloading metadata" torrents to occupy slots in the queue, ever, but there has to be someone who wants them to for whatever reason. @tedwin78gh you can "Force resume" any torrents to exempt them from the queue but FYI torrents in the state will also be exempt from the rechecking queue and will be rechecked in parallel with other torrents.

I'm still trying to understand how 'Force resume' and what you mean by the queue rechecking thing... To me force resume means the torrent is not counted at all. Is that right?

Does it make sense for you to set the max active torrents to unlimited? (and only control the other 2 limits) Ah, this does makes a lot of sense. After applying this setting just now the torrent is working as expected.

I'll monitor it and see for a couple of days if this is what it takes to work for me. Thanks everyone.