100 threads TIMED_WAITING in tomcat, causing it to stall as total number of threads crosses 200 100 threads TIMED_WAITING in tomcat, causing it to stall as total number of threads crosses 200 multithreading multithreading

100 threads TIMED_WAITING in tomcat, causing it to stall as total number of threads crosses 200


This got fixed when we fixed our code which was leaking DB connections managed by c3p0. There were few flows in our code where we were not calling rollback() specifically in catch block before closing entity Manager in finally block, so in case of exceptions connection was not coming back to pool and if frequency of exception is high(more than size of pool within timeout interval) then all other process threads would pile up to get connection.


Any idea what java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject is?

The ConditionObject is used inside the queue to synchronize access to the queue by different threads.

Its the standard stacktrace, when a thread of your executerpool is idle and waiting for new tasks.