Set ulimit without reboot

From DevOps Notebook

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.