Increase per-user Limit
You can define per-user open file limit on a Debian based Linux system. To set per-user limit, edit /etc/security/limits.conf file in a text editor.
sudo vim /etc/security/limits.conf
Add the following values in file:
* soft nproc 65535
* hard nproc 65535
* soft nofile 65535
* hard nofile 65535
username soft nproc 200000
username hard nproc 200000
username soft nofile 200000
username hard nofile 200000
Here we specifying separate limits which are 200000 for the user “username” and 65535 will be applied for the rest of the users. You can change these values per your requirements.
After that enable the pam_limits as followings:
sudo vim /etc/pam.d/common-session
Add the following line:
session required pam_limits.so
网友评论