tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mladen Turk <mt...@apache.org>
Subject Re: mod_jk makes ajp connector run out of free connections
Date Tue, 26 Oct 2010 15:34:32 GMT
On 10/26/2010 02:47 PM, Marc Wilmots wrote:
> Hi Experts,
>
> I have the following setup:
>
>                  Apache1
>                  /         \
>    Apache2           Apache3
>                 \          /
>                 Tomcat1
>
> All Apaches are version 2.2.3 (RedHat)
> Apache2 and Apache3 loadbalance Tomcat1 (6.0.18) with mod_jk (2.2.28).
>
> In idle state the AJP connector of Tomcat1 only has 7 active connections.
> After launching a stress test of Tomcat1, it's AJP connector has reached
> maxThreads (200). After the stress test has finished, there are still 200
> active connections in the AJP connector.
>
> Because of this, apache2 and apache2 cannot receive any heartbeat message
> anymore from the AJP connector and mark Tomcat1 as dead. I can access
> perfectly through port 8080, so Tomcat1 isn't dead at all!
>

You have a usual setup problem where the number of connections
in httpd fronting tomcat is too high for a tomcat.
And you don't have any mechanism for limiting those connections.

Now, RHEL5 offers both the the prefork (default) and worker
(httpd.worker) mpm, so if you wish to use that topology of yours
you will have to do do two things.
1. Use worker mpm
2. Limit the number of connections from httpd to tomcat by
    using connection pool (hint. maxThreads in Tomcat <= ServerLimit * ThreadsPerChild)

There is a nice calculator that my co-worker wrote:
http://lbconfig.appspot.com/

It's a simple and it'll generate all configs for you.



Regards
-- 
^TM

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message