First we start with user binding limit.

Edit: /etc/security/limits.conf

check if you have a section lines similar to:


*    hard     nofile  SOMENUMBER


if you do change it to something like or append if part is missing:


* hard nofile 750000 

* soft nofile 750000 

root hard nofile 750000 

root soft nofile 750000


note: after changing the file you will need to re-login for changes to take effect. Remember that application might be using different user.


System-Wide Limit.

Edit: /etc/sysctl.conf

change / append following value:

fs.file-max = 2097152


run sysctl -p after saving the file.


what is the difference?

file-max is the maximum File Descriptors (FD) enforced on a kernel level, which cannot be surpassed by all processes without increasing. The ulimit is enforced on a process level, which can be less than the file-max.