1

For testing purposes i even raised root's limit.

 # /etc/security/limits.conf


    *       soft    nofile         65535
    *       hard    nofile         65535
    root       soft    nofile         65535
    root       hard    nofile         65535

rtorrent process is run by user "user".

user@localhost:~$ ulimit -n
65535

But when i look up rtorrent's maximum number of open files:

user@localhost:~$ cat /proc/1141/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            8388608              unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             15700                15700                processes
Max open files            1024                 4096                 files
Max locked memory         65536                65536                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       15700                15700                signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
Max realtime timeout      unlimited            unlimited            us

I'm running Debian 9.1 Stretch.

The max_open_files limit in .rtorrent.rc config is also set.

I rebooted after the changes. Any idea why ?

Thanks for your answers!

EDIT: Looks like screen is the reason. If i start rtorrent without screen, everthing is fine. Any idea why ?

  • 1
    Maybe because your screen has such systemd patch!? Systemd has it's own limits in /etc/systemd/system.conf – rudimeier Aug 10 '17 at 15:30
  • Thank you! Changing DefaultLimitNOFILE=65535 in system.conf and user.conf worked for me! – johnyb0y Aug 10 '17 at 15:42
  • I will post this as an answer later. But maybe you could report this as a bug to Debian. IMO this screen behavior is odd/broken. – rudimeier Aug 10 '17 at 17:28
4

As rudimeier pointed out, you also need to change systemd specific limits. Changing DefaultLimitNOFILE=65535 in system.conf and user.conf worked for me!

Specifically these files:

  • /etc/systemd/system.conf
  • /etc/systemd/user.conf

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.