-
Notifications
You must be signed in to change notification settings - Fork 275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default configuration adds too many trackers to magnets #5355
Comments
This just seems like a bug with rTorrent, which is bad, because this just means if you add any torrent with more than a few trackers it just becomes unresponsive! |
It is not really a bug but a lacking feature. After examining the code and relevant issue on rtorrent git, it's just that rtorrent does not do async dns resolving for udp trackers which causes the blocking behavior. (It does for tcp trackers if libcurl is built with c-ares support). There is a PR waiting in queue for about a year now that implements udns support. My original point was not to add all these trackers by default as the most common usecase of Medusa+seedbox uses rtorrent. Not having DHT/PEX is usually the edge case when public trackers are involved and I do not know if the other torrent clients that are commonly used (deluge/transmission) implement async dns at all (not just for udp). Besides, adding a lot of trackers is frowned upon by other client developers as well (uTorrent developers come to mind). Not many users have the technical expertise to debug and troubleshoot this issue so in favor of less problems I believe the best solution is to reduce the trackers added by default and link this list below the setting, which is actively maintained, https://raw.githubusercontent.com/ngosang/trackerslist/master/trackers_all_udp.txt for anyone wishing to change/add more as a conscious choice. My concern is default configuration being problematic for the majority of the torrenting userbase (obviously this does not affect Usenet/NZB users). EDIT: Going on step further, you can even automatically update the list of added trackers with the first 4 trackers from the maintained list I linked and provide redundancy/always working trackers. |
@Nodens- |
Yeah but its good to have a list of working trackers that we dont have to maintain right? I know @duramato always keeps track, but still. |
@medariox |
For the sake of completion and in order to help people troubleshooting that may land on this issue via google: |
I don't think Medusa should intervene/modify any magnet link, unless it is required by the client. Maybe you can add an option global/per-client for max # of trackers, or magnet length, but do not do this unconditionally. |
Since this seems to be postponed for a long time, I'd like to add that at least with utorrent, there is a bug in how Medusa is adding/sending trackers from the magnet link itself via WebAPI. The limitation for uTorrent is a 1024 byte long magnet, and if the list is longer, the last tracker is 99% of the times - truncated badly. I'm attaching my fix for that, so you can compare and change/fix too. |
@rafi-d |
It's meant just as a related bug report (related to the too many trackers topic here) , I didn't intend for you to use my code (which I guess is not the best/optimal solution for a "smart truncate"...) , just as a way to point to the location the bug is... |
The list of added trackers is too long and this can cause a lot of problems as I found out. The hard way.
I do not know if this just affects rtorrent users but rtorrent is the default headless client for seedboxes and linux.
When Medusa adds a few magnets to rtorrent that has a decent number of seeding torrents, rtorrent is adding all the trackers to a list and tries to contact them in intervals. The problem starts to become serious when some of these trackers do not respond or have their dns records pointing to whatever instead of valid listening ips. This failed connection and/or dns resolve spam causes rtorrent to slow down
and eventually freeze entirely after a threshold, as I found out. It took me a few hours debugging this on one of my users' rtorrent client with 2K seeding torrents . Perhaps other torrent clients handle this differently in code but with the userbase of rtorrent on seedboxes, this is certainly an issue.
Considering that, for public trackers, with DHT/PEX you don't even need a tracker, adding 3-4 trackers tops, the most common ones, is the way to go.
The text was updated successfully, but these errors were encountered: