rakshasa / rtorrent

rTorrent BitTorrent client
https://github.com/rakshasa/rtorrent/wiki
GNU General Public License v2.0
4.07k stars 408 forks source link

rtorrent freezing on new install with 1k+ torrents, was fine on previous install with same version #1075

Open dotprofile opened 3 years ago

dotprofile commented 3 years ago

Hello, I set up a new environment for my torrents, but I am running into an issue. I saved all the session data, .rtorrent.rc, and running ubuntu server 20.04 as opposed to ubuntu 18.04.

It seems sort of random, but rtorrent ncurses UI will become unresponsive, but the Rutorrent UI (I know, unrelated) is fine, but all data transfer stops until I kill and restart only for this to happen again.

rtorrent.strace.log rtorrent.strace2.log

Filesystem issue?

Ubuntu Server 20.04 0.9.8 / 0.13.8-udns

dotprofile commented 3 years ago

# -- START HERE -- directory.default.set = /home/xxx/raid/ encoding.add = UTF-8 encryption = allow_incoming,try_outgoing,enable_retry execute.nothrow = chmod,777,/home/xxx/.config/rpc.socket execute.nothrow = chmod,777,/home/xxx/.sessions network.port_random.set = no network.port_range.set = 56000-56000 network.scgi.open_local = /var/run/xxx/.rtorrent.sock schedule2 = chmod_scgi_socket, 0, 0, "execute2=chmod,\"g+w,o=\",/var/run/xxx/.rtorrent.sock" network.tos.set = throughput pieces.hash.on_completion.set = no protocol.pex.set = no schedule = watch_directory,5,5,load.start=/home/xxx/rwatch/*.torrent session.path.set = /home/xxx/.sessions/ throttle.global_down.max_rate.set = 0 throttle.global_up.max_rate.set = 0 throttle.max_peers.normal.set = 100 throttle.max_peers.seed.set = -1 throttle.max_uploads.global.set = 100 throttle.min_peers.normal.set = 1 throttle.min_peers.seed.set = -1 trackers.use_udp.set = yes

execute = {sh,-c,/usr/bin/php /srv/rutorrent/php/initplugins.php xxx &}

# -- END HERE --

I did have another config for racing, but here I even tried a very modest and no frills configuration, still same error.

stickz commented 3 years ago

I would highly recommend setting up Dnsmasq on Ubuntu 20.04 if you haven't already. https://computingforgeeks.com/install-and-configure-dnsmasq-on-ubuntu-18-04-lts/

Once this is done, add network.http.dns_cache_timeout.set = 0 to your .rtorrent.rc file to disable the built in DNS cache.

In the event you didn't properly build or setup the udns patch, this will prevent rtorrent from freezing. This works very well with the udns patch to improve the performance of rtorrent with thousand of torrents added as well.

Also, schedule and execute are depreciated. You need to use schedule2 and exectute2 instead. The plugins also should be initialized 10 seconds after rtorrent has started. I don't recall the exact reason for this, but I remember it being very important. schedule2 = init_plugins, 10, 0, "execute2 = {sh,-c, /usr/bin/php /srv/rutorrent/php/initplugins.php xxx &}"

Once these things are done, give it a spin again. If rTorrent stutters for short bursts of time instead of freezing, it will be because you didn't build or setup the udns patch properly. In this case, it would be helpful to post the steps you took to install this patch.

pyroscope commented 3 years ago

The much better name for execute2 is execute.throw.

pyroscope commented 3 years ago

And the reason for delayed optional inits and things like watch schedules is avoiding trampling herd effects (well, add even more to the built-in trampling herd, actually).