binhex / arch-rtorrentvpn

Docker build script for Arch Linux base with ruTorrent, rTorrent, autodl-irssi, Privoxy and OpenVPN
GNU General Public License v3.0
238 stars 35 forks source link

[Solved] Rtorrent not starting around february 2023 #208

Open slch opened 1 year ago

slch commented 1 year ago

Sorry to necro bump this deprecated repo. Would like to share my problem and found solution.

So around the time it got deprecated, i encountered an issue that rtorrent won't start - i'd get infinite timeout on watcher for rtorrent process start. It was somewhere in February - i did update my host arch & restarted the server after couple months of uptime. Was not sure what exactly caused the rtorrent issue. Tried couple things with config and left it be. Now finally got time and remembered to get at it.

Today attached to container, tried starting it manually. Got error std::bad_alloc. After some googling found a thread from around the same time frame as error which did help - link You guys can read about _SC_OPEN_MAX or ulimit -n in the thread or somewhere else. My outputs were in same range with people in linked thread.

TLDR I put the following content in host's /etc/docker/daemon.json.

{
  "default-ulimits": {
    "nofile": {
      "Hard": 64000,
      "Name": "nofile",
      "Soft": 64000
    }
  }
}

Then following a reboot all was good again. Hope this helps if anyone got the same issue.

Update: Rtorrent kept stopping from time to time. Upped the limit from 64000 to 256000. Seems alright now.