You are here

Tomcat Socket accept failed java.io.IOException: Too many open files

If you open many HTTP connections during the same time in your service in Tomcat, you will probably get such exception: Socket accept failed java.io.IOException: Too many open files.

How to fix:

open $tomcat/bin/catalina.sh

add this line:
ulimit -n 8192

or
ulimit -n //this will set unlimit

then restart tomcat and start with 'catalina start', Java will run with the given limit above.

Blog: