Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am testing an app on Tomcat with one hour of crazy traffic from 200 users.

Everything is fine during the test.
But immediately AFTER the test (no more traffic), the number of threads rises inexplicably.
After a short but dangerous peak, it starts to decrease.

I computed an histogram to show the problem:

enter image description here

The yellow line (number of socketRead threads in Tomcat's thread pool) looks stable at first, but then jumps at the end of traffic (black vertical line).

QUESTION: Have you already seen this behavior, any idea what could be causing it?

Sometimes in production this phenomenon makes Tomcat reach maxThreads, causing all sorts of other problems.

Cluster of 5 nodes, Tomcat 6.0.26 / JK / Alfresco

Details about the other kinds of threads, if needed:

  • Red: socket read threads outside thread pool
  • Blue: threads waiting in thread pool
  • Green: java.util.concurrent.SynchronousQueue$TransferStack.awaitFulfill
  • Purple: Application-side DAO threads (the app is Alfresco, used as a WebDAV server)

PS: If you have any interest in generating such graphs, I can make my tool open source, let me know.

share|improve this question

This might be related to thread pooling.

might help.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.