Overview Description: org.apache.tomcat.util.net.AbstractEndpoint uses a org.apache.tomcat.util.threads.LimitLatch to limit the amount of connections to whatever was set using the maxConnections property of the connector. In the org.apache.tomcat.util.net.JIoEndpoint implementation this is incremented as part of the main Acceptor run method (JIoEndpoint:204) but only decremented during a specific case of SocketProcessor.run()(JIoEndpoint:310). If for any reason line 310 does not execute then, over time, the limitlatch will steadily increment with no possibility of decrementing. Until the limit is reached and no more connections can be serviced. In my particular case the problem occurs when the setSocketOptions method is called (JIoEndpoint:221) and the native implementation of PlainSocketImpl causes an error due to the socket being closed (as described in the comment on line 942 of http://cr.openjdk.java.net/~chegar/6882910/webrev.00/webrev/src/solaris/native/java/net/PlainSocketImpl.c.frames.html) Steps to Reproduce: Can't reproduce in isolation (due to unknown root cause creating initial error in native code). Reproducible under load in Performance and Production environments. Reading the code shows a number of possible reasons why this COULD happen. Actual Results: The container stops responding to requests. The process continues to run and scheduled tasks etc will continue occuring and logging. Can't even telnet to the port (as the Acceptor thread is blocked by the LimitLatch). Additional Builds and Platforms: - Occurs On Solaris - Doesn't Occur On Linux (although I would expect any other intermittent exception in JIoEndpointsetSocketOptions or JIoEndpoint$SocketProcessor.run() to produce the same result on any platform)
There might be some relation to BZ53173
Yep looks like a different instance of the same problem to me, didn't find that in my search. (In reply to comment #1) > There might be some relation to BZ53173
I concur, but I'd suggest we leave it open for Filip to review.
That is correct. Thank you for the report. It has been fixed. https://issues.apache.org/bugzilla/show_bug.cgi?id=53173 *** This bug has been marked as a duplicate of bug 53173 ***