3

Hello I am trying to increase file descriptors on a Virtual Private Server running Ubuntu 14.04.

What I've done so far:

1) raised fs.file-max in sysctl.conf

2) added the following line to /etc/pam.d/common-session and /etc/pam.d/common-session-noninteractive:

session required pam_limits.so

3) added the following lines to /etc/security/limits.conf:

* hard nofile 30000
* soft nofile 30000
root hard nofile 30000
root soft nofile 30000

Unfortunately even after restart I get the same values as before:

root@vps1:~# ulimit -Sn
1024
root@vps1:~# ulimit -Hn
4096
root@vps1:~# ulimit -n
1024

I have looked in /var/log/dmesg and /var/log/kern.log and could not find anything. But in systemd-logind.log I find this:

/proc/self/fd/9: 4: ulimit: error setting limit (Invalid argument)
Watching system buttons on /dev/input/event0 (Power Button)
New seat seat0.
/proc/self/fd/9: 4: ulimit: error setting limit (Invalid argument)
Watching system buttons on /dev/input/event0 (Power Button)
New seat seat0.
/proc/self/fd/9: 4: ulimit: error setting limit (Invalid argument)
Watching system buttons on /dev/input/event0 (Power Button)
New seat seat0.

Process with pid=9 seems to be "rcuos":

root@vps1:~# ps -aux | grep rcuos
root         9  0.2  0.0      0     0 ?        S    03:55   0:32 [rcuos/0]
root        18  0.1  0.0      0     0 ?        S    03:55   0:20 [rcuos/1]
root      4525  0.0  0.0   8872   944 pts/0    S+   07:54   0:00 grep --color=auto rcuos

What to try next ?

2 Answers 2

1

This change+reboot fixed our systemd-logind:

in file:

/etc/init/systemd-logind.conf

change this:

    ulimit -S -n 16384 || true
    ulimit -H -n 16384 || true

to this:

    ulimit -n 16384
0

Problem was related to disabling PAM in /etc/ssh/sshd_config:

UsePAM no

After allowing PAM, everything was ok. In order to have password disabled and still increase file descriptor limit, now I use:

PermitEmptyPasswords no
PasswordAuthentication no
UsePAM yes

This solves the problem!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .