tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <>
Subject Re: 2 second delays in mod_jk while "maintaining workers"
Date Wed, 08 Sep 2010 15:29:17 GMT
On 09/08/2010 05:08 PM, John Baker wrote:
> Hello,
> I don't thikn the shutdown call is to blame - I think it's the large pile
> of code below.  i.e. everything below the if (shutdown(..)) below.  The
> question is, what does it all do and does it actually work?  It appears to
> be the 'drain' code, but given it often results in this message:
> "Shutdown socket .. and read 0 lingering bytes in 2 sec."
> then it would suggest it doesn't work.  The comments also suggest the 2
> seconds is "guess work".
> I've sent SECONDS_TO_LINGER and MAX_SECS_TO_LINGER to 0 and the problem
> goes away, and I've seen this discussed elsewhere on the forum.
> So, if this code isn't needed, why is it still there?  And if it is
> needed, why does it seem not to work and what is the correct figure for
> SECONDS_TO_LINGER?  If this is being performed inline then I'd suggest 2s
> is far too long - clients don't want to wait 2s for a request to complete
> (ideally, socket clean up should not be done in this thread if any linger
> is required).

The code *is* required.
It is used when the client disconnects while the backend
still has some data in the AJP buffer. Drain is needed
to read that excess data.

If you can compile mod_jk and test, try adding some debug messages inside
the poll loop. Anyhow, seems to me there is some sort of network
problem you are facing.
Have you been able to see the traffic using Wireshark?


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message