Did this article resolve your question/issue?



Understanding "Connection Dead" and "Network Operation timed out" errors.

« Go Back


TitleUnderstanding "Connection Dead" and "Network Operation timed out" errors.
URL Name000029398
Article Number000165818
EnvironmentProduct: Connect for ODBC Oracle Wire Protocol driver
Version: All supported versions
OS: All supported platforms
Database: Oracle
Application: All supported applications
Question/Problem Description
Sometimes it is helpful to understand why the errors "Connection Dead" and "Network Operation timed out" can occur.  When one or both of these errors occur, the cause is not always clear.
Steps to Reproduce
Clarifying Information
Error Message[DataDirect][ODBC Oracle Wire Protocol driver][Oracle]Connection Dead.
[DataDirect][ODBC Oracle Wire Protocol driver][Oracle]Network Operation Timed Out.
Defect/Enhancement Number
The driver may report one or both of the errors depending on the timeout setting and the usability of the connection.

When the driver detects that the timeout has occurred, it will also try to determine if the connection is still valid and usable.

If the driver determines that the connection is still usable (socket is not closed) then it will report that the network operation has timed out. If the driver determines that the connection is no longer valid, then it will report that the network operation has timed out and also that the connection is dead.

The "connection dead" error can appear by itself if the driver attempts to communicate with the server and discovers that the socket has been closed.

The "connection dead" error can also appear by itself if the host and/or port is incorrect. This can be further confirmed by enabling packet logging with the driver. If the log does not contain any response packets from the server, this is a strong indication that the host and/or port are incorrect.

In the case of just the error "Network Operation timed out", the driver has detected that the timeout has been reached but still considers the connection to be valid and usable.

In the case when seeing both the "Network Operation timed out" and "Connection dead" together, the driver is timing out and also detects that the connection is no longer usable.

The driver determines whether a connection is valid by doing the following:

The driver sends an interrupt to the server to determine whether the connection is valid. The interrupt is used to cancel the current request.

If any of the following are true, then the connection is considered valid and usable:
  • The server replies with a cancel acknowledgement
  • The server replies with a valid response to the original request.
  • If the server has not replied, a simple database operation is performed. The operation is to open and close a  cursor.
Otherwise, the connection is no longer usable and the socket is closed.
First, confirm that the host and port details are correct. If so, there are a couple of connect options which may be useful in resolving this issue.

The connect option "Query Timeout" sets number of seconds for the default query timeout for all statements that are created by a connection. If the error is occurring when the server takes a long time to respond to queries, this could resolve the issue.
- If set to -1, the query does not time out. The driver silently ignores the SQL_ATTR_QUERY_TIMEOUT attribute.
- If set to 0, the query does not time out, but the driver responds to the
- If set to x (x is the value in seconds), all queries time out after the specified number of seconds unless the application overrides this value by setting the SQL_ATTR_QUERY_TIMEOUT attribute.

The connect option "Failover Mode" may also be useful.
Configure the connect option "AlternateServers" to the same connection if not currently using AlternateServers.
For example, let's say the Oracle listener service is configured on the host "MyServer", port "1521" and ServiceName=ORC_ABC

The AlternateServers property can be configured as follows: 

Then set Failover Mode to 1 or 2. 
If set to 1 (Extended Connection), the driver provides failover protection for new and lost
connections, but not any work in progress.
If set to 2 (Select), the driver provides failover protection for new and lost connections. In addition,
it preserves the state of work performed by the last Select statement executed.
References to other documentation:
Progress DataDirect Connect Series for ODBC Version 7.1.6 : Drivers for 32-Bit and 64-Bit Platforms : The Oracle Driver : Connection Option Descriptions
Last Modified Date9/17/2019 3:14 PM
Disclaimer The origins of the information on this site may be internal or external to Progress Software Corporation (“Progress”). Progress Software Corporation makes all reasonable efforts to verify this information. However, the information provided is for your information only. Progress Software Corporation makes no explicit or implied claims to the validity of this information.

Any sample code provided on this site is not supported under any Progress support program or service. The sample code is provided on an "AS IS" basis. Progress makes no warranties, express or implied, and disclaims all implied warranties including, without limitation, the implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample code is borne by the user. In no event shall Progress, its employees, or anyone else involved in the creation, production, or delivery of the code be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample code, even if Progress has been advised of the possibility of such damages.