Let's say we want to increase max open file descriptors to 65535. To do that:
/etc/sysctl.conf for editing and add the following line or replace one if it is already there:
fs.file-max = 65535
/etc/security/limits.conf for editing and put the following lines at the end of file or update values if they're already set:
* hard nofile 65535 * soft nofile 65535 * hard nproc 65535 * soft nproc 65535
Reboot your server.
Make sure that OS limits has been updated:
You should see updated value which is now 65535.