JDBCService.restore Error: Io exception: Connection timed out
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.
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.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)
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.
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.
|Commerce||Sterling Selling and Fulfillment Suite||MCS|
Rate this page:
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.