> From: Pieter Temmerman [mailto:ptemmerman....@sadiel.es]
> Subject: Thread dump analysis
>
> Memory usage looks healthy, but CPU usage goes sky high (mainly caused
> by the Java Tomcat process).

If you're truly out of memory, the GC thread(s) may be running almost 
continuously.  However, with modern JVMs (you didn't bother to tell us what JVM 
you're using, nor what platform you're on), that's a pretty rare occurrence; 
it's more likely an application thread that's looping.  As Leon suggested, look 
for threads in the runnable state and check the state of the heap.

> org.apache.commons.dbcp.PoolingDataSource.getConnection(Poolin
> gDataSource.java:96)

This shows that indeed the thread is waiting for a DB connection.  Note that 
the connection pool here is managed by the webapp, not Tomcat; the class names 
are different for Tomcat.

> My first question is, what is a TP-Processor exactly? Is each client
> connection to Tomcat being assigned a TP-Processor or am I wrong?

You're not wrong; each request (not client) is handled by a TP-Processor 
thread.  When processing for that request completes, the thread goes back to 
the thread pool to wait for another request from any client.

> So my guess is that the freeze is being caused by a database
> connection pool that is out of open connections

You seem to have two symptoms: high CPU usage, and running out of DB 
connections.  It is quite likely the two are related, perhaps the webapp gets 
in an infinite loop and therefore never releases DB connections back to the 
pool.

> Note the line "locked <0x00002aabadaabff8>" and "waiting on
> <0x00002aabadaabff8>" later on. So first it's locking that
> "thing" and then it's waiting on that "thing".

That "thing" is just a plain java.lang.Object, which is here serving the 
purpose of being a synchronization point.  Java synchronization semantics 
require that an object be locked before it can be waited on; the wait() 
releases the lock until someone other thread calls notify() on that object.

> Is that normal behavior?

Yes.

> Is there any way to know what the 0x00002aabadaabff8 means?

It's the virtual address of the object being waited on.  Not terribly useful 
other than as an identifier for the object at a given point in time.  The 
object can move during a garbage collection.

You really should move up to something a bit newer than 5.5.7; it's over four 
years old and lots of bug fixes have gone into the 5.5 line since then.  5.5.27 
is the current level for that leg.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

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

Reply via email to