On 19.02.2009 19:17, Anthony J. Biacco wrote:
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?
Do a thread dump "kill -QUIT". It goes to catalina.out and will tell
you, what all those 400 threads are doing. Maybe they are stuck working
on old requests nobody is waiting for.

All the idle threads look like this:

"ajp-8009-63" daemon prio=10 tid=0x000000001b52f000 nid=0x52ec in
Object.wait() [0x000000004610c000..0x000000004610cd90]
    java.lang.Thread.State: WAITING (on object monitor)
         at java.lang.Object.wait(Native Method)
         - waiting on<0x00002b3aebf5f840>  (a
org.apache.tomcat.util.net.AprEndpoint$Worker)
         at java.lang.Object.wait(Object.java:485)
         at
org.apache.tomcat.util.net.AprEndpoint$Worker.await(AprEndpoint.java:146
5)
         - locked<0x00002b3aebf5f840>  (a
org.apache.tomcat.util.net.AprEndpoint$Worker)
         at
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1490)
         at java.lang.Thread.run(Thread.java:619)

We can see, that you are using the APR connector implementation. That one in 6.0 doesn't shrink the threads.

All the above threads are sitting idle in the thread pool.

If you really need the pool to shrik, you could try the traditional one (i.e. without APR).

worker.template.reply_timeout=20000

When using such an ambitious reply_timeout, also use
max_reply_timeouts.

I'm under the understanding this is the timeout between packet responses
from tomcat. I don't think they should be any longer than this.

Often once there is a performance issue, response times go up a lot. When a reply timeout is detected, as a result the worker is put into error mode and the JK load balancer will send all request to some other node. Users will loose their sessions as a consequence. You don't want that to happen only because of a very short lived problem. So either increase the timeout, or use max_reply_timeouts, which will tolerate a couple of timeouts before putting the worker into error state.

worker.template.socket_connect_timeout=5000
worker.template.ping_mode=A
worker.template.ping_timeout=25000

Yeah, I tried 5 and 10, but jk was reporting it not getting cpongs back
from tomcat.

That's strange! Cping/Cpong should be very fast. If you run into a Cping/Cpong timeout with 10 seconds (=10000), then there's something wrong either with the network, or your Tomcat is blocked by too many parallel requests (or an OutOfMemoryError, or ...).

Regards,

Rainer

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

Reply via email to