commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wm.A.Stafford" <staff...@marine.rutgers.edu>
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 
org.apache.commons.dbcp.AbandonedObjectPool)
    at java.lang.Object.wait(Object.java:485)
    at 
org.apache.commons.pool.impl.GenericObjectPool.borrowObject(Unknown Source)
    - locked <0x75132118> (a org.apache.commons.dbcp.AbandonedObjectPool)
    at 
org.apache.commons.dbcp.AbandonedObjectPool.borrowObject(AbandonedObjectPool.java:117)
    - locked <0x75132118> (a org.apache.commons.dbcp.AbandonedObjectPool)
    at 
org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:110)
    at 
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:312)
    at 
dbAccess.FailSafeConnectionPool.getConnection(FailSafeConnectionPool.java:162)
    at servlets.ControllerServlet.doGet(ObisControllerServlet.java:93)

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,
-=beeky



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message