checking ulimit
To check ulimit
(which generally causes too many files open error), don’t use ulimit -n
ulimit of each process varies and when you issue the command, it’s issued by shell you’re logged in.
Instead, to check process’ pid, you should use cat /proc/<pid>/limits
You can get pid by ps aux|grep <process_name>
And increasing ulimit at system level is not a good idea (it’s system wide and stays same for any number of processes running.. so, your process may be underutilising the setting), please do it in respective process startup scripts..So, if java process requires ulimit of 24000, you need to explicitly set in /etc/init.d/java_process_name
so that ulimit remains to the process (like in first line ulimit 24000
)..
Don’t give all 65535 to your process.. that’s max files open, and linux might give unexpected failures if it’s unable to open files.. try to be graceful