commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maligurbuz <maligur...@yahoo.com>
Subject Re: dbcp thread are getting hanged.
Date Thu, 16 Jul 2009 10:54:17 GMT

Hi Asif, 

I have the same problem when one of the oracle nodes crashes, some worker
threads are waiting in this native method.

Have you solved this problem?



Asif Mekrani wrote:
> 
> Hi Forum,
> 
> We have a sun cluster with the with :
> 
> OS = Solaris 10 (Galaxy)
> Oracle = 10g (10.2.0.2.0)
> With DBCP Pooling (tried with the latest DBCP jar's).
> 
> In a typical scenario, when all the connections (process from our
> application, both node 1 and node 2)are made from say oracle instance 2
> (Node 2).
> 
> And we pull the power cable of the node 2. The process should switch there
> connection to the oracle instance from node 1. But we see that the thread
> are hanged .
> 
> The stack dump of the java process  is :
> 
> "DbUpdateTimer" daemon prio=3 tid=0x0000000000c96800 nid=0x22 runnable
> [0xfffffd7fb00fa000..0xfffffd7fb00fbb20]
>    java.lang.Thread.State: RUNNABLE
>         at oracle.jdbc.driver.T2CStatement.t2cParseExecuteDescribe(Native
> Method)
>         at
> oracle.jdbc.driver.T2CStatement.executeForDescribe(T2CStatement.java:725)
>         at
> oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1037)
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
>         at
> oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1272)
>         - locked <0xfffffd7fb5dc4f18> (a oracle.jdbc.driver.T2CStatement)
>         - locked <0xfffffd7fbaee5330> (a oracle.jdbc.driver.T2CConnection)
>         at
> org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
>         at
> org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
>         at
> org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:328)
>         at
> org.apache.commons.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:308)
>         at
> org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:855)
>         - locked <0xfffffd7fbad06300> (a
> org.apache.commons.pool.impl.GenericObjectPool)
>         at
> org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:95)
>         at
> com.alcatel.esls.util.persistence.ESLSDBCPConnectionProvider.getProvLoadSyncConnection(ESLSDBCPConnectionProvider.java:192)
>         at
> com.alcatel.esls.util.persistence.ESLSDBCPConnectionProvider$ProvLoadSynchProvider.getConnection(ESLSDBCPConnectionProvider.java:208)
>         at
> net.sf.hibernate.impl.BatcherImpl.openConnection(BatcherImpl.java:278)
>         at
> net.sf.hibernate.impl.SessionImpl.connect(SessionImpl.java:3264)
>         at
> net.sf.hibernate.impl.SessionImpl.connection(SessionImpl.java:3244)
>         at
> net.sf.hibernate.impl.BatcherImpl.prepareQueryStatement(BatcherImpl.java:65)
>         at
> net.sf.hibernate.loader.Loader.prepareQueryStatement(Loader.java:704)
>         at net.sf.hibernate.loader.Loader.doQuery(Loader.java:185)
>         at
> net.sf.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:133)
>         at net.sf.hibernate.loader.Loader.doList(Loader.java:950)
>         at net.sf.hibernate.loader.Loader.list(Loader.java:941)
>         at
> net.sf.hibernate.hql.QueryTranslator.list(QueryTranslator.java:834)
>         at net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1512)
>         at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:39)
>         at com.alcatel.esls.dbsynch.Updates.getUpdates(Updates.java:382)
>         at
> com.alcatel.esls.dbsynch.DbMemdbSynchronizer.doSync(DbMemdbSynchronizer.java:194)
>         at
> com.alcatel.esls.dbsynch.DbMemdbSynchronizer.run(DbMemdbSynchronizer.java:149)
>         at java.util.TimerThread.mainLoop(Unknown Source)
>         at java.util.TimerThread.run(Unknown Source)
> 
> 
> 
> "Timer-2" daemon prio=3 tid=0x00000000011a3800 nid=0x1e runnable
> [0xfffffd7fb18b9000..0xfffffd7fb18b9920]
>    java.lang.Thread.State: RUNNABLE
>         at oracle.jdbc.driver.T2CStatement.t2cDefineFetch(Native Method)
>         at
> oracle.jdbc.driver.T2CStatement.doDefineFetch(T2CStatement.java:1045)
>         at
> oracle.jdbc.driver.T2CStatement.executeForRows(T2CStatement.java:975)
>         at
> oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1060)
>         at
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1132)
>         at
> oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1272)
>         - locked <0xfffffd7fb5d25df8> (a oracle.jdbc.driver.T2CStatement)
>         - locked <0xfffffd7fbaee6168> (a oracle.jdbc.driver.T2CConnection)
>         at
> org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
>         at
> org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:205)
>         at
> org.apache.commons.dbcp.PoolableConnectionFactory.validateConnection(PoolableConnectionFactory.java:328)
>         at
> org.apache.commons.dbcp.PoolableConnectionFactory.validateObject(PoolableConnectionFactory.java:308)
>         at
> org.apache.commons.pool.impl.GenericObjectPool.evict(GenericObjectPool.java:1004)
>         - locked <0xfffffd7fbad06370> (a
> org.apache.commons.pool.impl.GenericObjectPool)
>         at
> org.apache.commons.pool.impl.GenericObjectPool$Evictor.run(GenericObjectPool.java:1112)
>         at java.util.TimerThread.mainLoop(Unknown Source)
>         at java.util.TimerThread.run(Unknown Source)
> 
> These threads do not come out of it, until the node 2 is up again.
> 
> The DBCP properties we are using is :
> # Provisioning Server : preload and synchronization
> prov.loadsync.dbcp.maxActive 7
> prov.loadsync.dbcp.whenExhaustedAction 1
> prov.loadsync.dbcp.maxWait 3000
> prov.loadsync.dbcp.maxIdle 7
> prov.loadsync.dbcp.minIdle 7
> prov.loadsync.dbcp.testOnBorrow=true
> prov.loadsync.dbcp.testOnReturn=true
> prov.loadsync.dbcp.testOnIdle=true
> prov.loadsync.dbcp.timeBetweenEvictionRunsMillis 100
> prov.loadsync.dbcp.numTestsPerEvictionRun 8
> prov.loadsync.dbcp.minEvictableIdleTimeMillis -1
> prov.loadsync.dbcp.softMinEvictableIdleTimeMillis 600
> prov.loadsync.dbcp.validationQuery=select 1 from dual
> prov.loadsync.dbcp.ps.maxActive 20
> prov.loadsync.dbcp.ps.whenExhaustedAction 1
> prov.loadsync.dbcp.ps.maxWait 3000
> prov.loadsync.dbcp.ps.maxIdle 100
> 
> Any help is highly appreciated.
> 
> Kind Regards,
> Asif Mekrani
> 
> 

-- 
View this message in context: http://www.nabble.com/dbcp-thread-are-getting-hanged.-tp19993725p24514232.html
Sent from the Commons - User mailing list archive at Nabble.com.


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


Mime
View raw message