tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vivek aggarwal <>
Subject Re: Tomcat 6.0 queries
Date Sun, 14 Oct 2012 16:16:56 GMT
Thanks Mark for responding.. great piece of info.. Thanks again

 From: Mark Eggers <>
Sent: Sunday, 14 October 2012 12:47 AM
Subject: Re: Tomcat 6.0 queries
On 10/13/2012 3:42 AM, vivek aggarwal wrote:
> Hello All,
> Can you guys please help in understanding my following concerns/queries :-
> 1.  How can we configure the number of threads for managing simultaenous
> HTTP connection requests coming from Apache. Is there any connection time out value
> we have at the tomcat side which we can configure ?????

There is a lot of documentation. I'm going to make a few assumptions here. If they are not
right, then my comments will not make a lot of sense.

I'm assuming that you're fronting one or more Tomcat servers with Apache HTTPD. I'm also assuming
that you're using the AJP connector (mod_jk).

Managing the number of connections is done in server.xml when you configure the Connector.
See the maxThreads attribute. There is an additional backlog attribute as well. So the total
number of simultaneous connections would be maxThreads + backlog, with only maxThreads being

There is another way of managing the total number of threads with an Executor thread pool.
I've not discussed that here.

Timeout values are in two places. There are two values in server.xml which govern how long
a connection waits for a URI once it's open (connectionTimeout) and how long to wait for another
request (keepAliveTimeout). Both are infinite by default.

You'll want those values to be in sync with your AJP configuration (normally found in
In particular, pay attention to connection_pool_timeout.

Note that the connection_pool_timeout value is in seconds, while the keepAliveTimeout is in

Recent source versions of mod_jk have a very good example in the conf subdirectory of the

For more information, I suggest that you read:

> 2. In tomcat how to check the number of  requests served at a particular
> moment or  the number of open connnections from tomcat side?/

JMX is probably your best bet here. This has been discussed several times on the mailing list.
You also might find the following useful:

> 3.  for the ongoing connection request how does the tomcat manage the
> user sessions ,,, any configuration for the same do we have which we can tune ??

Read the servlet specification. In particular, pay attention to the session-config and session-timeout
elements in web.xml.

> Thanks for your help in advance,
> Vicky

. . . . just my two cents.

To unsubscribe, e-mail:
For additional commands, e-mail:
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message