遇到问题---ulimit open files number within process

问题分析及解决

Posted by VK on December 8, 2019

change the number of open files limit

increase open files limit

cat /proc/<pid>/limits
lsof -p <pid>

diagnose too many open files issue

systemomap

I just put the line ulimit -n 8192 inside the catalina.sh, so when I do the catalina start, java runs with the specified limit above.

As a system administrator: The /etc/security/limits.conf file controls this on most Linux installations; it allows you to set per-user limits. You’ll want a line like myuser - nofile 1000.

Within a process: The getrlimit and setrlimit calls control most per-process resource allocation limits. RLIMIT_NOFILE controls the maximum number of file descriptors. You will need appropriate permissions to call it.