Is your script, application, or command getting an error as “Too many open files”? Then you have reached the max open file limit allowed by Linux. For resolving this issue, you need to increase the open file limit as shown below:
Open the below file:
/etc/security/limits.conf
Paste the below text towards the end:
* hard nofile 500000 * soft nofile 500000 root hard nofile 500000 root soft nofile 500000
After you save the file, logout, and login again.
With this simple change, the limit on open files will get increased.