commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wm.A.Stafford" <>
Subject DBCP - What is this thread dump telling me?
Date Fri, 12 Oct 2007 19:12:47 GMT
Our Tomcat instance has been hanging add odd  intervals. 
We see many, many identical thread dumps like this:

http-8082-Processor84" daemon prio=10 tid=0x0887c000 nid=0x5663 in 
Object.wait() [0x6c1ad000..0x6c1ae030]
   java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x75132118> (a 
    at java.lang.Object.wait(
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source)
    - locked <0x75132118> (a org.apache.commons.dbcp.AbandonedObjectPool)
    - locked <0x75132118> (a org.apache.commons.dbcp.AbandonedObjectPool)
    at servlets.ControllerServlet.doGet(

There is clearly something pathological going on but I'm not sure what.  
It looks to me like this and all the other threads are waiting on 
org.apache.commons.dbcp.AbandonedObjectPool which is locked by another 
thread.  But I can not deduce much more.

We are using dbcp-1.0.  The code handles connections rather strangely 
but it seems to be closing them correctly.  There is one static 
Connection object and a call to a local getConnection() calls close() on 
this static connection then replaces it with a connection returned by a 
call to BasicDataSource.getConnection(). 

There is one exception handler that calls close() on the BasicDataSource 
and then creates a new one. I thought this might be the problem, that 
somehow the connections associated with the previous BasicDataSource 
were still being held but I can't see a scenario that would do this.

We are also using a BasicDataSource in our Spring enabled DAOs but there 
is no common code sheared by these and the legacy code that is being 
fingered by the thread dump.

Any help or advice will be greatly appreciated,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message