3

Ours is a Struts2 java webapplication, using hibernate 3.5 ORM. When we perfom some parallel actions on the app, we are getting the below exceptions and the java process cpu utilization is at its max.

May 15, 2012 12:39:59 AM org.apache.catalina.core.ApplicationDispatcher invoke
SEVERE: Servlet.service() for servlet jsp threw exception
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:59)
    at org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:210)
    at java.lang.Thread.run(Thread.java:662)

Please suggest us accordingly.

2 Answers 2

7

I guess you are on a linux based operating system? It's seems that you need to increase the number of max. file handles per process.

have a look here: http://ehaselwanter.com/en/blog/2009/03/13/tomcat-too-many-open-files/

Sign up to request clarification or add additional context in comments.

Comments

1

It Exceeded the number of open file descripted limits. Solution : Increase the Hard and soft limits on number of open files.

soft nofile 999999 hard nofile 999999 In /etc/security/limits.conf file

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.