Atomikos Forum

TestQuery is executed for a long time

Hello community!
I'm using 3.8.0 atomicos, spring 3.1.1, Tomcat 7. Oracle 11.
I need an advice.

My testQuery to AtomikosDataSourceBean is "SELECT 1 FROM DUAL".
My web application periodically stops working. Cause is thread blocking on com.atomikos.datasource.pool.ConnectionPool#borrowConnection.
Cause of this case is next:
One thread called "borrowConnection"(method is synchronized). Then it called com.atomikos.datasource.pool.AbstractXPooledConnection#createConnectionProxy and then tried testing connection by testQuery.

From the thread dump I saw that other threads waiting for monitor(instance of ConnectionPool).
Application stops work and customers want to reboot application. But!! (see my previos topic default82df.html?community.6.3330.1). Nobody can stop application without forcing shutdown or kill process.

Today I waited for error and saw following:
com.atomikos.datasource.pool.CreateConnectionException: Error executing testQuery
    at com.atomikos.jdbc.AtomikosXAPooledConnection.testUnderlyingConnection(AtomikosXAPooledConnection.java:128) ~[transactions-jdbc-3.8.0.jar:na]
.....
Caused by: java.sql.SQLRecoverableException: IO Error: Connection timed out
    at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:889) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1175) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1296) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1916) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1878) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at com.atomikos.jdbc.AtomikosXAPooledConnection.testUnderlyingConnection(AtomikosXAPooledConnection.java:124) ~[transactions-jdbc-3.8.0.jar:na]
    ... 56 common frames omitted
Caused by: java.net.SocketException: Connection timed out
    at java.net.SocketInputStream.socketRead0(Native Method) ~[na:1.7.0_45]
    at java.net.SocketInputStream.read(SocketInputStream.java:152) ~[na:1.7.0_45]
    at java.net.SocketInputStream.read(SocketInputStream.java:122) ~[na:1.7.0_45]
    at oracle.net.ns.Packet.receive(Packet.java:308) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.net.ns.DataPacket.receive(DataPacket.java:106) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:324) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.net.ns.NetInputStream.read(NetInputStream.java:268) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.net.ns.NetInputStream.read(NetInputStream.java:190) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.net.ns.NetInputStream.read(NetInputStream.java:107) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:124) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:80) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1137) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:350) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:227) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:195) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:876) ~[ojdbc6-11.2.0.4.jar:11.2.0.3.0]
    ... 62 common frames omitted

So, Why Does it takes a long time?
The testQuery is executed for about 15 minutes!! Is it a standard I/O timeout for oracle connection?

Thanks a lot.
Sergey Send private email
Thursday, May 07, 2015
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics