Skip to content
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

freezes 20+ torrents, tracker related #1257

Open
squid-slime opened this issue Dec 23, 2023 · 2 comments
Open

freezes 20+ torrents, tracker related #1257

squid-slime opened this issue Dec 23, 2023 · 2 comments

Comments

@squid-slime
Copy link

im less so asking for a work around but rather wondering when the tracker issue will be fix if it can be?
love the application i dont want to move away from it be its unusable and has been for a long while for me.
as soon as i add a torrent with 20+ seeders and handfull of trackers i am met with freezing, there needs to be an internal implementation to handle dead trackers that is distro agnostic, i am on arch, i believe debian is safer for rtorrent.
the work around ive seen are very advanced compiling crul, i am not sure how itll effect the rest of my system, then theres the python script to delete trackers which is great that a community member made something so beneficial but it means installing python deps and is some what hacky as even the creator had said.

thank you for your hard work, id love to see rtorrent get beyond this.

i will send logs privately if necessary and if it would help.

@stickz
Copy link
Contributor

stickz commented Dec 26, 2023

I would recommend using the swizzin install script if you're on Debian. This will take care of the curl + c-ares for you. And you can also install the UDNS branch, if you want to use UDP trackers. https://github.com/swizzin/swizzin

@Colseph
Copy link

Colseph commented Jun 4, 2024

rtorrent can already handle this internally, through use of the built in scripting

# how many times can a tracker fail BEFORE we disable it, change 10 to fit your needs
method.insert = failed_disable_count, value|const|private, 10

# if more than the last <failed_disable_count> attempts failed, disable tracker
method.insert = check_tracker, private|simple, \
    "branch = ((and, (t.is_enabled), \"greater= ((t.failed_counter)), ((failed_disable_count))\" )), \
        ((t.disable))"

# check all trackers for all torrents in main view
method.insert = check_trackers, private|simple, \
    "d.multicall2 = main, \"t.multicall = (d.hash), (cat), check_tracker=\""

The above will add a command you can manually call from the ui. hit crtl+x then type check_trackers= and press enter, this will disable all trackers that have failed consecutively the last 11 or more times.

If you'd like this to be automatic, you can add a schedule

# check trackers every 10 min, starting 100 secs after startup
schedule2 = check_trackers_schedule, 100, 600, check_trackers=

BUT if you are going to have trackers disabled automatically, it would probably be wise to have some process in place to re-enable them as well, otherwise if your internet goes down for an hour or so, all of your trackers will be disabled due to failures.

The below adds a schedule to automatically re-enable all disabled trackers nightly. This basically gives the 'bad' trackers a chance(10 or less minutes depending on how your startup time lines up with midnight) to make a successful connection and stay enabled. This way if a good tracker is disabled due to some network fluke(ie internet/dns outage) it can come back.

You can also manually run enable_trackers= if for some reason you need to re-enable them all yourself.

# if tracker is disabled, re-enable
method.insert = enable_tracker, private|simple, \
    "branch = (not, (t.is_enabled)), ((t.enable))"

# enable all disabled trackers for all torrents in main view
method.insert = enable_trackers, private|simple, \
    "d.multicall2 = main, \"t.multicall = (d.hash), (cat), enable_tracker=\""

# re-enable all trackers 15 seconds after startup, then each midnight (in case any are working again)
schedule2 = enable_trackers_schedule, 15, 00:00:00, enable_trackers=

These are just snips from my current config, there may be better ways to do it, but it seems to work alright for me.
I would recommend reading the docs so you know what this is doing before using it in your config.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants