I cannot seem to figure out what exactly is needed to allow the maximum number of file descriptors to be raised permanently for all users.
root hard nofile 1500000 root soft nofile 1000000 root hard nproc 15000 root soft nproc 10000 * hard nofile 1500000 * soft nofile 1000000 * hard nproc 15000 * soft nproc 10000
I have placed the following in the
session required pam_limits.so
After a reboot, logging in as any user and issuing
ulimit -n resulted in
After that, I tried requiring
pam_limits.so into every file under
/etc/pam.d. Rebooted. Logged in. No such luck.
If I issue the command
ulimit -n 1000000, then check, the limit is set as expected. So, I placed
@reboot ulimit -n 1000000 into
crontab -e. Rebooted. Logged in. No luck.
/etc/ssh/sshd_config and PAM is enabled.
I have tried setting the limits on every reboot with:
/sbin/sysctl -w fs.file-max=1000000 /sbin/sysctl -p
I have a server that has a ton of concurrent traffic, and need those limits that high, because it takes the server a very long time to clear out file descriptors. What do I have to do in order to permanently raise the file descriptor limit?