Linux‎ > ‎

Max Open Files

ulimit -n is for max open files. Typically when it low tomcat/jboss runs into the following error:

java.net.SocketException: Too many open files

To fix this, edit /etc/security/limits.conf and add the following lines:

* soft nofile 8192
* hard nofile 8192

run

ulimit -n 8192

This should show you the current values

ulimit -a

Also add the following to /etc/sysctl.conf

fs.file-max = 1578396



Comments