I have Sonarr and Radarr setup with Deluge and they are failing to import completed downloads. I checked the trace logs and is seems the cause is that Deluge reports those torrents as not finished, so Sonarr/Radarr don't attempt to import them. If I force re-check, the finished status changes and Sonarr/Radarr has no problems importing the files. How can I get Deluge to report this correctly?
deluged 2.1.1
libtorrent: 2.0.5.0
Python: 3.10.6
OS: Linux Ubuntu 22.04 jammy
json shows is_finished=false for torrents that are completed
Re: json shows is_finished=false for torrents that are completed
You didn't mention, but in deluge's UI - either standalone or thin client - does the torrent show as "Seeding" or is it sitting at "Downloading" after reaching 100% - possibly still writing from cache/RAM to disk.
libtorrent 2.x uses memory mapped files, which store as much of the file as it can in memory, rather than writing as it goes for the most part, so from my experience if you have your libtorrent settings set to defaults (not using something like ltconfig to change this - search the plugins section for this plugin and optimal settings) it will store a lot of the download in memory, sometime several GB's for larger files...then after finishing, write to disk. If the disk is not a SSD, this can be rather slow and it will remain "Downloading" - i.e. not completed - for several minutes if not longer depending on the torrent's size.
You can increase the IO threads if you're using an SSD, as well as maybe try the wslimit plugin mhertz wrote to limit the amount of memory mapping done by libtorrent...this will take some tinkering and tweaking to get optimal results.
I use aio_threads between 10 and 16 depending on the disk's speed (traditional SATA SSD), and aio_max of 200...this may not be right for you though, do some research (google is your friend) - I think the default is 8 which is usually fine for traditional hard drives.
I would do a test download with sonarr or radarr and see what deluge is actually showing while sonarr and radarr report it not finished, if you haven't (you don't say whether you have) and report back...
wslimit plugin for memory limits on libtorrent - viewtopic.php?f=9&t=56387
ltconfig for custom libtorrent settings in deluge - viewtopic.php?f=9&t=42887
libtorrent 2.x uses memory mapped files, which store as much of the file as it can in memory, rather than writing as it goes for the most part, so from my experience if you have your libtorrent settings set to defaults (not using something like ltconfig to change this - search the plugins section for this plugin and optimal settings) it will store a lot of the download in memory, sometime several GB's for larger files...then after finishing, write to disk. If the disk is not a SSD, this can be rather slow and it will remain "Downloading" - i.e. not completed - for several minutes if not longer depending on the torrent's size.
You can increase the IO threads if you're using an SSD, as well as maybe try the wslimit plugin mhertz wrote to limit the amount of memory mapping done by libtorrent...this will take some tinkering and tweaking to get optimal results.
I use aio_threads between 10 and 16 depending on the disk's speed (traditional SATA SSD), and aio_max of 200...this may not be right for you though, do some research (google is your friend) - I think the default is 8 which is usually fine for traditional hard drives.
I would do a test download with sonarr or radarr and see what deluge is actually showing while sonarr and radarr report it not finished, if you haven't (you don't say whether you have) and report back...
wslimit plugin for memory limits on libtorrent - viewtopic.php?f=9&t=56387
ltconfig for custom libtorrent settings in deluge - viewtopic.php?f=9&t=42887
Re: json shows is_finished=false for torrents that are completed
They are definitely seeding in Deluge. They will sit completed and seeding indefinitely, and sonarr/radarr will not pick up that they are complete.
Re: json shows is_finished=false for torrents that are completed
I use *arr myself, and there are a few things you can check since it appears Deluge has marked these torrents as "Finished" best I can tell from the information at hand...I know this isn't an *arr support forum but since I have experience with them here's what I can suggest...
1. Check you are using the latest version of the respective *arr's - however since it is both radarr and sonarr experiencing this, I'm not sure it truly is an *arr issue...I assume you have also hit the "Refresh" button in "Activity" and it remains stuck "Downloading".
2. Hover over the would-be importing/downloading icon to the left of the show/movie name in Activity section, does it say "Downloading" after deluge has marked it as "Seeding" and it is finished? or does it say "Waiting for Import" and gets stuck? Or an error of some sort (no files to import, etc)?
3. Check "Settings -> Download Clients" for your "Check For Finished Downloads Interval" - I'm sure this is not the issue, but I set mine to 1...
4. If none of these show anything, you could try deleting the download client and readding it, and attempting to download again and see what happens.
5. Download qBittorrent (or another supported client) and see if this behavior persists across different torrenting clients, that would narrow it down to either *arr issues/bugs with your setup or deluge (moreso), at the very least...
6. Instead of re-checking, try Pausing and Resuming the download and then hit "Refresh" in the *arr and see if it changes...
I'm not entirely sure what's going on, I have no issues like you say and I'm running 2.1.1 with both sonarr and radarr (latest develop branch) - never experienced this...but I'm not on ubuntu. I'd also maybe check out the discord for Radarr/Servarr (https://discord.com/invite/8Dbsx35rrx) - they've helped me many times, even with bugs in attached applications *arr was working WITH...very active community.
Let me know what those things I listed show/do and I'll of course do my best as well to help narrow this down/help too.
1. Check you are using the latest version of the respective *arr's - however since it is both radarr and sonarr experiencing this, I'm not sure it truly is an *arr issue...I assume you have also hit the "Refresh" button in "Activity" and it remains stuck "Downloading".
2. Hover over the would-be importing/downloading icon to the left of the show/movie name in Activity section, does it say "Downloading" after deluge has marked it as "Seeding" and it is finished? or does it say "Waiting for Import" and gets stuck? Or an error of some sort (no files to import, etc)?
3. Check "Settings -> Download Clients" for your "Check For Finished Downloads Interval" - I'm sure this is not the issue, but I set mine to 1...
4. If none of these show anything, you could try deleting the download client and readding it, and attempting to download again and see what happens.
5. Download qBittorrent (or another supported client) and see if this behavior persists across different torrenting clients, that would narrow it down to either *arr issues/bugs with your setup or deluge (moreso), at the very least...
6. Instead of re-checking, try Pausing and Resuming the download and then hit "Refresh" in the *arr and see if it changes...
I'm not entirely sure what's going on, I have no issues like you say and I'm running 2.1.1 with both sonarr and radarr (latest develop branch) - never experienced this...but I'm not on ubuntu. I'd also maybe check out the discord for Radarr/Servarr (https://discord.com/invite/8Dbsx35rrx) - they've helped me many times, even with bugs in attached applications *arr was working WITH...very active community.
Let me know what those things I listed show/do and I'll of course do my best as well to help narrow this down/help too.
Re: json shows is_finished=false for torrents that are completed
Well I'm not sure what changed, but it seems to be working again now. I know I checked in the Sonarr trace logs and found the json response from Deluge, and in that response there were several torrents that showed as Seeding in Deluge, but the is_finished property returned as false (hence the post title). I haven't checked since it started working again to see if that has changed or not.
ambipro wrote: ↑Tue Feb 14, 2023 2:32 pm I use *arr myself, and there are a few things you can check since it appears Deluge has marked these torrents as "Finished" best I can tell from the information at hand...I know this isn't an *arr support forum but since I have experience with them here's what I can suggest...
1. Check you are using the latest version of the respective *arr's - however since it is both radarr and sonarr experiencing this, I'm not sure it truly is an *arr issue...I assume you have also hit the "Refresh" button in "Activity" and it remains stuck "Downloading". Yes, it shows as downloading (with a full bar), indefinitely
2. Hover over the would-be importing/downloading icon to the left of the show/movie name in Activity section, does it say "Downloading" after deluge has marked it as "Seeding" and it is finished? or does it say "Waiting for Import" and gets stuck? Or an error of some sort (no files to import, etc)? *arr says Downloading, Deluge says Seeding
3. Check "Settings -> Download Clients" for your "Check For Finished Downloads Interval" - I'm sure this is not the issue, but I set mine to 1... I don't see this option in Sonarr, although I don't think it would have an impact since I saw torrents sitting for many hours unimported
4. If none of these show anything, you could try deleting the download client and readding it, and attempting to download again and see what happens. Didn't try this, but it seems to be working again
5. Download qBittorrent (or another supported client) and see if this behavior persists across different torrenting clients, that would narrow it down to either *arr issues/bugs with your setup or deluge (moreso), at the very least... Didn't try this, but it seems to be working again
6. Instead of re-checking, try Pausing and Resuming the download and then hit "Refresh" in the *arr and see if it changes... Didn't try this, but it seems to be working again
I'm not entirely sure what's going on, I have no issues like you say and I'm running 2.1.1 with both sonarr and radarr (latest develop branch) - never experienced this...but I'm not on ubuntu. I'd also maybe check out the discord for Radarr/Servarr (https://discord.com/invite/8Dbsx35rrx) - they've helped me many times, even with bugs in attached applications *arr was working WITH...very active community.
Let me know what those things I listed show/do and I'll of course do my best as well to help narrow this down/help too.