Skip to main content

JDBCService.restore Error: Io exception: Connection timed out


Technote (troubleshooting)


Problem(Abstract)

JDBCService.restore Error: Io exception: Connection timed out

Symptom

This error can be due to the message between the App and DB are dropping. Due to this Oracle might be closing the connections without notifying the appserver. The appserver might be assuming the connections are alive. They are not resulting in a hung application. This might happen due to a firewall between app server and DB server.

Error Message

2009.01.21 00:18:45:282 Env/TP-Processor20:ERROR:JDBCService JDBCService.checkConnectState Error: Connection test failed - Closing connection
2009.01.21 00:18:45:282 Env/TP-Processor20:ERROR:JDBCService JDBCService.restore Error: Io exception: Connection timed out
java.sql.SQLException: Io exception: Connection timed out
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:162)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:274)
at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatemen t.java:432)
at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:8 96)
at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatem ent.java:452)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:986 )
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStateme nt.java:2888)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement. java:2929)
at com.comergent.dataservices.JDBCService.restore(JDBCService.java:437)
at com.comergent.dataservices.SqlDataObject.restore(SqlDataObject.java:373)
at com.comergent.dataservices.DataBean.restore(DataBean.java:461)
at com.comergent.dataservices.DataListBean.restore(DataListBean.java:140)

Resolving the problem

The best solution is to set the ConnectTimeout preference. These settings are in the Prefs.xml for 8.x version and DataServices.xml file for earlier verisons.
If ReconnectOnTimeout=false then it will test a timed out connection before reusing it or if ReconnectOnTimeout=true then it automatically discard the timed out connection and reconnect.
You need to set the ConnectTimeout. If no timeout is set then it will never test the connection.
It is recommended to set the ConnectTimeout=30. It can even be set to less if you set ReconnectOnTimeout=false. With that setting it will simply test the connection upon timeout instead of incurring the overhead of establishing a new connection.
To make the connection never timeout, you should set the ConnectTimeout=0. 0 means never timeout.

Also MaxRequestsPerConnect should always be set to 1. This controls how many read-only requests can simultaneously use a connection. Theoretically it is possible to run all read-only requests on a single connection, but performance testing has shown that there is contention for database connection based resources. A large request will tie up sufficient resources that all other requests will be forced to wait for it to complete. Setting MaxRequestsPerConnect=1 resolves the problem.

For eg:

1) ConnectTimeout=30
2) ReconnectOnTimeout = true
With the above settings, the application is going to reconnect every 30 minutes and might avoid the ‘inactivity time’ in the firewall, if any.
Please check these parameters in Prefs.xml or Dataservices.xml accordingly.

Cross Reference information
Segment Product Component Platform Version Edition
Commerce Sterling Selling and Fulfillment Suite MCS

Historical Number

NFX7835

Product Alias/Synonym

Escalation ID


14104

Type


NormalFix

Build


7.x, 8.x

Rate this page:

(0 users)Average rating

Copyright and trademark information

IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.

Rate this page:


(0 users)Average rating

Add comments

Document information

Sterling Data Synchronization Manager

MCS


Software version:
All


Operating system(s):
All


Reference #:
1551872


Modified date:
2009-12-10

Translate my page

Content navigation