You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Steve Job <to...@wwwcrazy.com> on 2004/09/18 11:46:59 UTC
Stability problem due to "Too many open files"
Having a problem keeping Tomcat 5 up and running after a long period of time on
Redhat 9 with JDK build 1.4.2_05-b04
This application is running just Tomcat (no Apache integration)
Once this happens I have to stop Tomcat, restart it, and then everything is fine
again for a few weeks.
Any resolution to this?
I get:
SEVERE: Endpoint [SSL: ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=443]]
ignored exception: java.net.SocketException: Too many open files
java.net.SocketException: Too many open files
at java.net.PlainSocketImpl.socketAccept(Native Method)
at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
at java.net.ServerSocket.implAccept(ServerSocket.java:448)
at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(DashoA12275)
at
org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:110\
)
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:534)
And I get:
java.io.IOException: java.io.IOException: Too many open files
at java.lang.UNIXProcess.<init>(UNIXProcess.java:143)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:566
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Stability problem due to "Too many open files"
Posted by QM <qm...@brandxdev.net>.
On Sat, Sep 18, 2004 at 05:46:59AM -0400, Steve Job wrote:
: I get:
: SEVERE: Endpoint [SSL: ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=443]]
: ignored exception: java.net.SocketException: Too many open files
: java.net.SocketException: Too many open files
Someone else mentioned ulimit. You could also look into tuning your
network stack.
Most OSs default to a very high wait time on closing disconnected
sockets. For machines that serve large numbers of short-lived
connections (e.g. web servers) this can produce the very problem
you've experienced.
Reduce the TIME_WAIT interval, which should reduce the number of
sockets in CLOSE_WAIT state. Since sockets == handle == "file" in the
Unix sense, this should reduce the number of files you have open at
any given time.
For Solaris the ndd param is tcp_time_wait_interval; in Linux it's
somewhere under /proc/sys/net/ (aka "sysctl net.something.other").
-QM
--
software -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Stability problem due to "Too many open files"
Posted by Tim Funk <fu...@joedog.org>.
Look at ulimit. (And the archives talking about ulimit - I think the faq also
talks about this too)
-Tim
Steve Job wrote:
> Having a problem keeping Tomcat 5 up and running after a long period of time on
> Redhat 9 with JDK build 1.4.2_05-b04
>
> This application is running just Tomcat (no Apache integration)
>
> Once this happens I have to stop Tomcat, restart it, and then everything is fine
> again for a few weeks.
> Any resolution to this?
>
>
> I get:
> SEVERE: Endpoint [SSL: ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=443]]
> ignored exception: java.net.SocketException: Too many open files
> java.net.SocketException: Too many open files
> at java.net.PlainSocketImpl.socketAccept(Native Method)
> at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:353)
> at java.net.ServerSocket.implAccept(ServerSocket.java:448)
> at com.sun.net.ssl.internal.ssl.SSLServerSocketImpl.accept(DashoA12275)
> at
> org.apache.tomcat.util.net.jsse.JSSESocketFactory.acceptSocket(JSSESocketFactory.java:110\
> )
> 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:534)
>
>
> And I get:
>
> java.io.IOException: java.io.IOException: Too many open files
> at java.lang.UNIXProcess.<init>(UNIXProcess.java:143)
> at java.lang.Runtime.execInternal(Native Method)
> at java.lang.Runtime.exec(Runtime.java:566
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org