Set ulimit without reboot

From DevOps Notebook
Revision as of 10:28, 20 February 2020 by MilosZ (talk | contribs) (Created page with " Modify ''limits.conf'' file located (on most distros) at ''/etc/security/limits.conf''. <br> Append following lines: <pre> * soft nproc 768000 * hard nproc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Modify limits.conf file located (on most distros) at /etc/security/limits.conf.
Append following lines:

* soft     nproc          768000
* hard     nproc          768000
* soft     nofile         768000
* hard     nofile         768000
root soft     nproc          768000
root hard     nproc          768000
root soft     nofile         768000
root hard     nofile         768000

This will modify limits for all users to 768000 ( you can modify this number to your needs )

To apply changes without reboot, modify /etc/pam.d/common-session, by adding this line:

session required pam_limits.so

Note: You need to relogin in order to see updated limits.