4

We keep monitoring our threads in tomcat 7 and off lately we started seeing that at times the number of threads would become double the normal value i.e. around 200 threads (rather than the usual around 80 threads).

Upon taking a thread dump, I see that during the time the number of threads increase, the increase due to presence of a large number (around 100) of threads as shown below (all waiting on 588cc7d5):

"http-bio-8080-exec-201" - Thread t@2856
   java.lang.Thread.State: TIMED_WAITING
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for <588cc7d5> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.parkNanos(Unknown Source)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(Unknown Source)
    at java.util.concurrent.LinkedBlockingQueue.poll(Unknown Source)
    at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:86)
    at org.apache.tomcat.util.threads.TaskQueue.poll(TaskQueue.java:32)
    at java.util.concurrent.ThreadPoolExecutor.getTask(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

   Locked ownable synchronizers:
    - None

Does anyone know what can cause this behavior?

user2809732
  • 111
  • 1
  • 1
  • 6

1 Answers1

0

Probably you have reached the limit of 8080 connectors thread pool size and all incoming requests are stacked in queue and waiting a released thread. The default value for maxThreads is 200, but this value can be changed in your configuration. See http://tomcat.apache.org/tomcat-7.0-doc/config/executor.html for details. Complete thread dump is much more useful for details.

Yury
  • 29
  • 1