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

The Easysoft ODBC-ODBC Bridge client retries 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 total. If there is a sudden rush of connections therefore, the operating system may turn some down. These connections never reach the ODBC-ODBC Bridge server therefore. When the client receives ECONREFUSED, it waits connection_attempt * 0.1 seconds before trying again, up to a maximum of NetConnectRetryCount times.

In this example, NetConnectRetryCount is 5 (the default):

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 this 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

In this example, the first few attempts are refused because the listen backlog queue is full. By the third attempt, however, the backlog is clear and the connection succeeds:

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

To change the NetConnectRetryCount, edit your ODBC-ODBC Bridge data source. On Windows, use the ODBC Data Source Administrator to do this. On Linux and UNIX, edit NetConnectRetryCount in the {Settings} section of your odbc.ini file. For example:

{Settings}
NetConnectRetryCount = 3

Note that NetConnectRetryCount is a global setting, which affects all data sources.