On 22/10/2010 16:47, Jason Britton wrote:
> one of two of the hanging applications are doing db connection validation.
> 
> The application using DBCP configures it's SharedPoolDataSource using
> 
>             setValidationQuery("select 'validationQuery' from dual");

That looks weird.  Is that really the query?

>             setTestOnBorrow(true);
> 
> Funny enough, thread stacktrace below shows thread hung when doing
> validation query sitting on socket read.  Other application not using
> DBCP and not using connection validation query hangs on socket read
> just the same.  Web server lives in DMZ crosses firewall to get to
> database, I'm going to start accusing the network guys of crushing my
> connections on firewall.  Not sure why validation query is not saving
> me in this instance.

So the connection during the validation query isn't actually working?
It ought to fail after a period & kill the connection.

If you're configuring it manually, can you give us the full config?



p

> Thread stacktrace showing runnable thread sitting on socket read while
> trying to do connection validation query
> "catalina-exec-company1-2" daemon prio=10 tid=0x000000004bf5b800
> nid=0x41a2 runnable [0x0000000042be1000]
>    java.lang.Thread.State: RUNNABLE
>       at java.net.SocketInputStream.socketRead0(Native Method)
>       at java.net.SocketInputStream.read(SocketInputStream.java:129)
>       at oracle.net.ns.Packet.receive(Packet.java:293)
>       at oracle.net.ns.DataPacket.receive(DataPacket.java:92)
>       at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:174)
>       at oracle.net.ns.NetInputStream.read(NetInputStream.java:119)
>       at oracle.net.ns.NetInputStream.read(NetInputStream.java:94)
>       at oracle.net.ns.NetInputStream.read(NetInputStream.java:79)
>       at 
> oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:112)
>       at 
> oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:73)
>       at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1040)
>       at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1016)
>       at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:588)
>       at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
>       at 
> oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:780)
>       at 
> oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:855)
>       at 
> oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1187)
>       at 
> oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1378)
>       - locked <0x00002aaad1f64df8> (a oracle.jdbc.driver.T4CConnection)
>       at 
> oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:387)
>       at 
> org.apache.commons.dbcp.datasources.KeyedCPDSConnectionFactory.validateObject(KeyedCPDSConnectionFactory.java:163)
>       at 
> org.apache.commons.pool.impl.GenericKeyedObjectPool.borrowObject(GenericKeyedObjectPool.java:837)
>       - locked <0x00002aaace878d18> (a
> org.apache.commons.pool.impl.GenericKeyedObjectPool)
>       at 
> org.apache.commons.dbcp.datasources.SharedPoolDataSource.getPooledConnectionAndInfo(SharedPoolDataSource.java:165)
>       - locked <0x00002aaaced306f8> (a
> org.apache.commons.dbcp.datasources.SharedPoolDataSource)
>       at 
> org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:631)
>       at 
> org.apache.commons.dbcp.datasources.InstanceKeyDataSource.getConnection(InstanceKeyDataSource.java:615)
>       at 
> com.mycompany.db.ConnectionHandler.getConnection(ConnectionHandler.java:150)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

Attachment: 0x62590808.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to