Monday, July 1, 2013

JBOSS java.net.SocketException: Too many open files

While user trying move more than 1 gb to webtop or more this kind of error ocuured in Jboss server.

java.net.SocketException: Too many open files
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.AbstractPlainSocketImpl.accept(AbstractPlainSocketImpl.java:396)
at java.net.ServerSocket.implAccept(ServerSocket.java:522)
at java.net.ServerSocket.accept(ServerSocket.java:490)
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:722)

We had experienced the similar error on RHEL 5 under moderate load.
It appeared that default max open files limit is just 1024 which is too low.
Check: ulimit -n
Fix for current session: ulimit -n 102400

Persistent fix: echo yourusername - nofile 102400 >>/etc/security/limits.conf and restart session

No comments:

Post a Comment