tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony J. Biacco" <>
Subject mod_jk pool/thread/configure questions
Date Wed, 18 Feb 2009 18:14:08 GMT

I'm using apache 2.2.11 with tomcat 6.0.18 and mod_jk 1.2.27 on linux
2.6 x86_64.
I was using a prefork mpm in apache, but have now moved to the worker
I have a question or two regarding mod_jk in light of this change.

1. I'm running with ThreadsPerChild at 25 and MaxClients at 500. So, I
understand this to mean my connection pool minimum size will be a total
of 13. (25+1/2). And then that this will be divided between my 4 tomcat
backends fairly equally. And as I look at my jkstatus page, I see the 13
for "Max busy", but for each backend it lists a "Max" of 3,4,5, and 5
respectively. My question is this.. for the min size of "13" why is it
labeled in jkstatus as "Max Busy" (and the distributed connection pool
for each worker under "Max"). If this is actually the connection MIN
size, isn't the label inaccurate?
If it is really the Max size instead of the Min size, does that mean
it's the Max per httpd process or across all processes? I would THINK
per process, since the ThreadsPerChild are per process. So, for my total
of 13 above, if I have 4 httpd processes running, is my pool total for
all backends 13*4 (52), or 13?
I was hoping that my max connections per backend were my (MaxClients -
number of thread in reserve for apache static)/number of tomcat
backends. So if I wanted 100 threads for apache static and had 4
backends, I'd have (500 - 100)/4 = 400/4 = 100 max pooled connections
per backend. Is this not a viable way to run things? My maxThreads in
the tomcat backends are set to 400.

2. In tomcat, It seems that my threads keep increasing, though they're
not used. I thought that the connectTimeout in tomcat and the
connect_timeout/ping_timeout in mod_jk would stop this by closing idle
threads, but it does not. Eventually the threads in tomcat with reach
the max of 400 and stay there until tomcat is restarted. Is there a way
to resolve this? And more importantly, should I resolve it? Is there any
major memory/CPU inplications to it keeping its  threads at the max?

3. What are the benfits to configuring mod_jk with --enable-EAPI and for
what circumstances should this be used?

Relevant configurations follow..
Thanx a lot.

<IfModule mpm_worker_module>
    ServerLimit         20
    StartServers        3
    MaxClients          500
    MinSpareThreads     50
    MaxSpareThreads     125
    ThreadsPerChild     25
    MaxRequestsPerChild 200000
JkWatchdogInterval 60
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories


    <Connector port="8009" protocol="AJP/1.3"
        maxThreads="400" backlog="25" maxPostSize="4194304"
        enableLookups="false" connectionTimeout="60000"
        redirectPort="8443" />

Manager, IT Operations
Format Dynamics, Inc.

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

View raw message