Rtorrent/rutorrent crashing

There is a well known issue where rutorrent will crash rtorrent.

Everyone time i access my seedbox or my other users they must restart the rtorrent service.
I have ‘manually’ timed the crashes. I always happened after 8 hours. Before then its random.
Sometimes it only lasts an hour.

When rtorrent crashes, seeding is not active, which causes havic for the communities im involved in.

You should check your logs to find out what might be causing the crash because that is not certainly normal behavior. It could either be a bad torrent or a bad RPC call from ruTorrent that’s bringing it down.

As for this script, we don’t use cron. rtorrent is controlled by systemd. You can easily have the service restart on failure by editing the service if you like.

sudo nano /etc/systemd/system/[email protected]
at the bottom of the middle section add

Restart=on-failure

Like so:

[Service]
Type=forking
KillMode=none
User=%I
ExecStartPre=-/bin/rm -f /home/%I/.sessions/rtorrent.lock
ExecStart=/usr/bin/screen -d -m -fa -S rtorrent /usr/bin/rtorrent
ExecStop=/usr/bin/killall -w -s 2 /usr/bin/rtorrent
WorkingDirectory=/home/%I/
Restart=on-failure

When done, save and exit.

sudo systemctl daemon-reload

To reload the services and then restart any rtorrent services you have.

Lira,

Thanks for the assist, But it should be noted that his behavior happens across all users.
One of my users said it happens even when they have nothing loaded.
Maybe its related to the vmware driver?

I am going to make your change and see what happens.

thank you!

this repair does fix the problem for about 3 days. Then i have to manually restart the service.
an interesting note is, it appears to NOT affect debian. Only ubuntu.

Several of us use ubuntu here without issues. My server has been up for ~15 days without seeing any services crash.

There could be something in your specific config. Trying to check the logs your currently have and enabling further logging would be the best place to look. While the script does work on OpenVZ and KVM machines, support is limited