tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rainer Jung <>
Subject Re: [newbie] connectionTimeout value for AJP Connector
Date Wed, 10 Sep 2008 17:23:55 GMT
Bill Barker schrieb:
> "Stacey Jones" <> wrote in message 
>> Hi, I am a new member on tomcat mailing list.
>> For tomcat 5.5 - Is there a recommended value for connectionTimeout
>> attribute? How to decide this value?
>> The documentation says : The number of milliseconds this Connector will
>> wait, after accepting a connection, for the request URI line to be
>> presented. The default value is infinite (i.e. no timeout).
>> Thanks for your help!
> Like most configuration options, the recommended value depends on your setup 
> :).  For small to medium sized applications on systems like Windows or 
> Solaris the default value is reasonable (which is why it is the default). 
> For Linux systems with newer kernals, this should be alright as well.  On 
> these systems the cost is fairly low to have lots of threads blocking on 
> i/o.  It is Linux systems with older kernals that cause problems.  Also if 
> you are using the APR or (experimental) NIO AJP connector it should be fine 
> on most o/s, since there is no relation between the number of connections 
> and the number of threads.  If there isn't a firewall between Apache/IIS and 
> Tomcat I would set it to be pretty high on well-behaved systems (at least 
> 5min for a medium sized app).  If there is a firewall, then it should be 
> probably slightly less than the firewall setting to close idle connections.

I don't know if the following already was obvious. The phrase "after
accepting a connection, for the request URI line to be presented" in the
AJP should be extended by "It also limits the amount of time a
persistent AJP connection is kept open waiting for the next request to
arrive." AJP13 uses persistent connections, much like HTTP Keep-Alive.
The more common use case for this timeout is not limiting waiting for
the initial request directly after connections establishment, but
mlimiting the maximum idle time of the connection between consecutive

There is a similar timeout on the mod_jk side. Please have a look at



To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message