Error "java.net.SocketException: Too many open files" at deployment phase in jboss-portal-2.7.2

abg picture abg · Jan 30, 2013 · Viewed 17.6k times · Source

When start the jboss-portal-2.7.2 at some point in the log message:

2013-01-30 20:32:02,541 ERROR [org.apache.tomcat.util.net.JIoEndpoint] Socket accept failed
java.net.SocketException: Too many open files
        at java.net.PlainSocketImpl.socketAccept(Native Method)
        at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:408)
        at java.net.ServerSocket.implAccept(ServerSocket.java:462)
        at java.net.ServerSocket.accept(ServerSocket.java:430)
        at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
        at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:309)
        at java.lang.Thread.run(Thread.java:662)

In the deploy folder a total of 20. war modules. Any solutions?

Answer

onlykalu picture onlykalu · Jun 26, 2013

Increase ulimit on your server for the user running tomcat.

To check ulimit:

ulimit -n

To increase for current session:

ulimit -n 102400

You can make permanent changes by editing /etc/security/limits.conf.