Connection timeouts with a SQL Server can take many forms. Here are some of the most common:
System.Data.SqlClient.SqlException : Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
System.Data.SqlClient.SqlException (0x80131904): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. System.ComponentModel.Win32Exception (0x80004005): The wait operation timed out.
Microsoft.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - This is usually a temporary error during hostname resolution and means that the local server did not receive a response from an authoritative server.)
Microsoft.Data.SqlClient.SqlException (0x80131904): Connection Timeout Expired. The timeout period elapsed while attempting to consume the pre-login handshake acknowledgement. This could be because the pre-login handshake failed or the server was unable to respond back in time. The duration spent while attempting to connect to this server was - [Pre-Login] initialization=5018; handshake=12;
See the full list of errors in Timeout expired messages when connecting to SQL Server.
To address this issue, the initial approach you should consider is increasing your connection timeout.
In Remote Desktop Manager, go to File – Data sources and edit your Microsoft SQL Server data source by clicking on the Edit data source icon.
In the Advanced tab, increase the Connection timeout delay.
Save your changes.
If adjusting the connection timeout duration did not resolve the issue, check your firewall settings. SQL Server operates on dynamic ports, requiring the appropriate ports to be open for seamless communication between Remote Desktop Manager and your SQL Server. For guidance on which ports to enable, please consult the "Ports used by the Database Engine" section in Configure the Windows Firewall to allow SQL Server access.
If you continue to experience connection timeout issues, the root cause might be related to the SQL Listener or availability groups. In such cases,try setting the MultiSubnetFailover value to True.
-
In Remote Desktop Manager, go to File – Data sources and edit your Microsoft SQL Server data source by clicking on the Edit data source icon.
-
In the Advanced tab, click on More settings.
-
Search for the MultiSubnetFailover setting and set its value to True.
It is recommended to use either Failover Partner and MultiSubnetFailover , not both simultaneously. Ensure the Failover Partner value is cleared.
-
Click OK then save your changes.
See this Microsoft article for more information: Timeout occurs when you connect to an Always On listener in multi-subnet environment.
Certificate validation issues.
If the solutions mentioned above have not resolved the issue, additional potential fixes can be found in the following Microsoft articles:
Feel free to contact our customer support team for further assistance.