Easysoft ODBC-ODBC Bridge

How does the ODBC-ODBC Bridge client handle refused connections?

Article:
00627
Last Reviewed:
12th January 2024
Revision:
2

The Easysoft ODBC-ODBC Bridge client will retry connection attempts if the server operating system returns ECONREFUSED (connection refused). The reason for this is that on some platforms, the listen backlog can only be set to a low level. If there is a sudden rush of connections therefore, The operating system may turn some down before the ODBC-ODBC Bridge Server sees them. When ECONREFUSED is received by the client, it waits connection_attempt * 0.1 seconds before trying again, up to a maximum of NetConnectRetryCount times.

Here is an example where NetConnectRetryCount is 5 (the default), and the server always refuses the connection:

connect attempt 1 - refused by server
wait 0.1 seconds
connect attempt 2 - refused by server
wait 0.1*2 seconds
.
.
.
connect attempt 5 - refused by server

The ODBC-ODBC Bridge client gets error diagnostic:

08001:1:4:[Easysoft ODBC (Client)]
Client unable to establish connection
HY000:2:4:[Easysoft ODBC (Client)]
Connection refused, connect(), after 5 attempts

Here is an example where the first few attempts are refused due to the listen backlog queue being full, but by the third attempt, the backlog is cleared and the connection accepted:

connect attempt 1 - refused by server
wait 0.1 seconds
connect attempt 2 - refused by server
wait 0.1 * 2 seconds
connect attempt 3
connection accepted by server operating system

The NetConnectRetryCount is 5 by default, but it may be modified in the ODBC-ODBC Bridge DSN dialog (Windows) or in the {Settings} section of your odbc.ini file. E.g.:

{Settings}
NetConnectRetryCount = 3

Please note NetConnectRetryCount is a global setting for all DSNs.

Applies To

Knowledge Base Feedback

* Did this content help you?
* Please select one option based on your first choice:

(* Required Fields)