tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Abley <james.ab...@gmail.com>
Subject Re: DBCP Deadlock
Date Mon, 09 Feb 2009 10:52:52 GMT

Hi,

I'm running Tomcat 6.0.18 and still see this issue. Can you provide more
information about how one might disable background validation, or when a
version of Tomcat might be released does not contain this issue [1]? My
resource is currently defined like this:

<Resource name="jdbc/db" type="javax.sql.DataSource"
      auth="Container"
      description="MySQL database Resource" username="user"
      password="pass"
      driverClassName="com.mysql.jdbc.Driver"
      url="jdbc:mysql://mysql-host:3306/my-db"
      maxActive="100" maxIdle="10"
      testWhileIdle="true"
      timeBetweenEvictionRunsMillis ="10000"
      minEvictableIdleTimeMillis ="600000"
      validationQuery="select 1"/>

I think that disabling background validation means I should remove the
testWhileIdle attribute and instead use testOnBorrow [2], but I would like
to confirm.

Cheers,

James

[1]
http://svn.apache.org/repos/asf/tomcat/trunk/modules/jdbc-pool/doc/jdbc-pool.xml
[2]
http://dev.mysql.com/doc/refman/5.1/en/connector-j-usagenotes-j2ee.html#connector-j-usagenotes-tomcat


Filip Hanik - Dev Lists wrote:
> 
> Tomcat uses 1.2.2 in that version, so I would suggest not using the 
> background validation at this point
> 
> Filip
> 
> Metta wrote:
>> I'm running TC 6.0.16 on 64Bit RH Linux 5.1
>>
>> We're seeing a deadlock in the tomcat-dbcp - looks like it's to do with
>> the
>> abandoned connection checking. I thought 6.0.16 used the
>> commons-dbcp-1.2.2
>> release which supposedly fixes this issue?
>>
>> =============================
>> "Timer-3":
>>   waiting to lock monitor 0x0000000053b40548 (object 0x00002aaabf3210f0,
>> a
>> org.apache.tomcat.dbcp.dbcp.PoolableConnection),
>>   which is held by "TP-Processor27"
>> "TP-Processor27":
>>   waiting to lock monitor 0x0000000053b404d0 (object 0x00002aaab9fa8b08,
>> a
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool),
>>   which is held by "Timer-3"
>>
>> Java stack information for the threads listed above:
>> ===================================================
>> "Timer-3":
>>         at
>> org.apache.tomcat.dbcp.dbcp.AbandonedTrace.addTrace(AbandonedTrace.java:175)
>>         - waiting to lock <0x00002aaabf3210f0> (a
>> org.apache.tomcat.dbcp.dbcp.PoolableConnection)
>>         at
>> org.apache.tomcat.dbcp.dbcp.AbandonedTrace.init(AbandonedTrace.java:92)
>>         at
>> org.apache.tomcat.dbcp.dbcp.AbandonedTrace.<init>(AbandonedTrace.java:82)
>>         at
>> org.apache.tomcat.dbcp.dbcp.DelegatingStatement.<init>(DelegatingStatement.java:61)
>>         at
>> org.apache.tomcat.dbcp.dbcp.DelegatingConnection.createStatement(DelegatingConnection.java:224)
>>         at
>> org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:331)
>>         at
>> org.apache.tomcat.dbcp.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:312)
>>         at
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1217)
>>         - locked <0x00002aaab9fa8b08> (a
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool)
>>         at
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1341)
>>         at java.util.TimerThread.mainLoop(Timer.java:512)
>>         at java.util.TimerThread.run(Timer.java:462)
>> "TP-Processor27":
>>         at
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.addObjectToPool(GenericObjectPool.java:1136)
>>         - waiting to lock <0x00002aaab9fa8b08> (a
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool)
>>         at
>> org.apache.tomcat.dbcp.pool.impl.GenericObjectPool.returnObject(GenericObjectPool.java:1076)
>>         at
>> org.apache.tomcat.dbcp.dbcp.PoolableConnection.close(PoolableConnection.java:87)
>>         - locked <0x00002aaabf3210f0> (a
>> org.apache.tomcat.dbcp.dbcp.PoolableConnection)
>>         ....
>>   
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/DBCP-Deadlock-tp17999703p21910567.html
Sent from the Tomcat - Dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message