tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <>
Subject Re: Connection timeout
Date Thu, 10 May 2012 19:25:22 GMT
On 10/05/2012 20:06, Jon Drukman wrote:
> I have a commercial app running Tomcat 6.  I don't really know anything
> about Tomcat, so I need some help with performance tuning.
> What happens is that a small percentage of connections from our client
> machines just timeout on the connect.  I assume I'm running into some
> limitation in Tomcat.
> Here's what I put in my server.xml:
>  <Connector port="8080" protocol="HTTP/1.1" 
>                connectionTimeout="3000" 
>                connectionLinger="-1"
>                acceptCount="500"
>                maxKeepAliveRequests="1"
>                enableLookups="false"
>                redirectPort="8443" />

You're using the BIO connector with the default maxThreads of 200.

> The machine in question is an Amazon "Extra Large" instance, so it
> should be plenty beefy.
> Do those settings look good?

Not really.  Did you change the connectionTimeout downwards from the
default 60 secs to 3 secs?

> Is there any other place I can tune the system to have it accept more 
> simultaneous clients, or have a deeper wait queue?

Do you really want to queue up requests, rather than just accepting them
and assigning them to threads?

You've increased the acceptCount from 100 to 500, whereas it would
probably just be better to revert that change and increase maxThreads
from 200 to 400* - if you've got the resources to spare.

There should be entries in the log files stating that Tomcat has reached
maxThreads if that's really an issue.

You can also use the NIO connector if you want more more concurrency.


* 400 is a guess - I've got no idea how many clients you have.

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



View raw message