I have an application using AppFuse and mysql database
The problem is sometime the following exception is thrown :
Jan 27, 2011 4:54:56 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket
SEVERE: Endpoint ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=8080] ignored exception: java.net.SocketException: Too many open files
java.net.SocketException: Too many open files
开发者_Go百科at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
at java.net.ServerSocket.implAccept(ServerSocket.java:453)
at java.net.ServerSocket.accept(ServerSocket.java:421)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:60)
at org.apache.tomcat.util.net.PoolTcpEndpoint.acceptSocket(PoolTcpEndpoint.java:368)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:549)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:619)
Jan 27, 2011 4:54:56 AM org.apache.tomcat.util.net.PoolTcpEndpoint acceptSocket.
Please could any one tell me the main reason for that exception? And if that exception can lead tomcat to be shutdown ?
Thanks in Advance
are you performing a bunch of sql statements against your db in a tight loop?
If so, make sure you do stmt.close() on each one.
精彩评论