Easysoft ODBC-ODBC Bridge

Why do I get connection refused/reset under heavy loads (Windows ODBC-ODBC Bridge Server)?

Last Reviewed:
4th January 2024

The main ODBC-ODBC Bridge Server thread listens for incoming connections from Easysoft ODBC-ODBC Bridge clients. Once a connection is accepted the main ODBC-ODBC Bridge server thread creates a new thread/process, which handles the ODBC connection. Whilst the main server thread is starting up a new connection thread/process, it does not accept other connections. The time required to start a new connection handler is usually very short but to avoid newly incoming connections being dropped the server attempts to set the listen backlog queue to 20. The listen backlog queue allows the TCP/IP stack to queue the connection until the server gets around to accepting the connection.

If the listen backlog queue fills up, the TCP/IP stack will reject the connection and the ODBC-ODBC Bridge Server will never see it.

Unfortunately, in Windows 9X and NT Workstation the maximum listen backlog is 5. Since the ODBC-ODBC Bridge Server is usually pretty quick at accepting connections, this low backlog value is not usually a problem. However, it does mean that concerted attempts to make lots of connections in a short period of time can fill the backlog queue. This makes Windows NT Workstation and Win9X in particular a bad choice for a high-load server.

The ODBC-ODBC Bridge Server could use SOMAXCONN in Winsock2 to set the listen backlog queue to its maximum value (this has no effect on NT workstation and Win9x). However, large backlogs make SYN flood attacks much more effective. since the queue is non-pageable system memory.

The ODBC-ODBC Bridge client can help with connection refused problems due to the socket backlog filling in Win9X and NT Workstation by making multiple connection attempts. See the question "Does the ODBC-ODBC Bridge client support connection timeouts and connections retries?"

Applies To

Knowledge Base Feedback

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

(* Required Fields)