Hi,

After investigating the problem we have reported earlier a little more, it looks like we have the following problem:

Every now and then we get heaps of SocketExceptions in the logs on Tomcat, all in ChannelSocket.invoke() in jk.common.ChannelSocket.java. Then all TP-Processor threads are going into standby mode, ie. if I do a dump of all threads of the JVM, all Tomcat TP-Processor threads sit in the "socketRead0()" call waiting for mod_jk to send some subsequent data.

But the mod_jk side of things looks different, it claims it is waiting for Tomcat to send back data for the current requests! I did a "netstat -p" then on the app servers and saw that mod_jk did indeed still have a socket connection to the Java processes.

So, Tomcat/CoyoteConnector sits idle waiting for "connections" but in reality, the socket connections are stuck somewhere and not closed properly. Apache/mod_jk is waiting for Tomcat to write the response back to the user, but since the exception was thrown it is not going to do that.

While reading the ChannelSocket.processConnection() code I came across a final and this comment:

/*
* Whatever happened to this connection (remote closed it, timeout, read error)
* the socket SHOULD be closed, or we may be in situation where the webserver
* will continue to think the socket is still open and will forward request
* to tomcat without receiving ever a reply
*/


Well, this seem to be exactly our problem! I see from the code that it should closethe connection since a SocketException is thrown in "this.invoke(recv, ep);", which should trigger the close call. But then, what is going wrong?

Why is Tomcat and mod_jk getting out of sync with connections?

I am puzzled.

Please can anyone out there help?

Thanks,
Lars


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to