Torrents permanently idle after second announcement

General support for problems installing or using Deluge
bro
Top Bloke
Top Bloke
Posts: 364
Joined: Sun Aug 28, 2011 6:46 pm
Location: Norway

Re: Torrents permanently idle after second announcement

Post by bro »

A fix is proposed here. http://dev.deluge-torrent.org/ticket/2257

Will test this tonight.
When reporting issues, please include any relevant information such as OS (and version), python version (for Windows users this depends on which Deluge installer was used), Deluge version and plugin version.
Cas
Top Bloke
Top Bloke
Posts: 3681
Joined: Mon Dec 07, 2009 6:04 am
Location: Scotland

Re: Torrents permanently idle after second announcement

Post by Cas »

PisoMojado, I forgot to mention that if you install libtorrent from source you will also need to run ldconfig after install, to update the lib location.
skiik
New User
New User
Posts: 2
Joined: Tue Jan 15, 2013 1:02 pm

Re: Torrents permanently idle after second announcement

Post by skiik »

bro wrote:A fix is proposed here. http://dev.deluge-torrent.org/ticket/2257

Will test this tonight.
Thank you, ive tried to apply it too and will let everyone know how it goes.

I wasnt too sure how to apply the patch so i just edited the /usr/share/pyshared/deluge/core/preferencesmanager.py file i found using locate.

Please let me know if theres something else i need to do

Cheers, and thanks
PisoMojado
New User
New User
Posts: 8
Joined: Sat Dec 29, 2012 5:15 pm

Re: Torrents permanently idle after second announcement

Post by PisoMojado »

I'm glad to see that this thread didn't die - I was concerned that it would slowly sink until everyone, myself included, forgot about it.

I'm guessing it might have something to do with the way libtorrent works: I don't think it's a coincidence that as soon as I have exactly one more than 256 (i.e. the exact address space of a byte) torrents, a torrent loses it's next announce. Furthermore, for each additional torrent I add to Deluge, there is one more torrent that loses its announce. The behavior seems to be erratic: a torrent will lose it's announce, but as soon as another torrent tries to announce, it will take it's place and that torrent will become idle. This means that for each torrent you have over 256, there will be a torrent - no necessarily that one - waiting to be able to announce. My guess is that Deluge is managing some sort of queue for libtorrent, and that libtorrent is simply designed to hold onto an array of torrents no larger than what a byte can address to. Once a certain torrent can announce, it does, pushing another out of libtorrent's array and potentially preventing it from announcing the next time it tries. This wouldn't really be a problem for a few over 256 - they would be able to update with little to no interruption. If you were, however to have many torrents - say, 1000 or 2 to 3 times the number of torrents libtorrent can keep track of, it would cause an awful lot of congestion.

These are just my speculations; I don't know if this is the actual problem or if I'm in completely the wrong direction on this problem, but I would like to try and solve this issue somehow. Now, I'm not on the Deluge team, and I'm not sure when I would have the time to do this, but I would like to like to look at the source for rtorrent, deluge, and libtorrent-rasterbar if I can - to see how the library actually behaves, and to see how each of the aforementioned clients handles it (rtorrent does not have these issues). Perhaps I can come to an understanding as to what the problem might be, and make a suggestion to the right people - anyone else is encouraged to do likewise.

skiik, I think for the time being my solution will be this: the vast majority of my torrents don't actually need to be sorted or their filenames altered, they just need to be put into the right folder. So, I have configured an rtorrent client to just pay attention to some directories and to download torrents accordingly. For everything I have where I have rewritten the file names into more human-readable formats, I will keep them in deluge. Fortunately for me, this number is smaller than 256, so I avoid the problem at hand. I suggest you do something similar until a solution is discovered.

Edit: Whoops, looks like I posted this without even taking a look at the second page. It looks like there are a lot of really useful tips here, so I will try to play around with as many as I can. Thank you cas, bro and skiik for your helpful replies.
Post Reply