Error: Read Timed Out While Reading Pre-Login Response
Issue
SQL Server database connection tests fail with the following error, even though the Proxy Agent and host connectivity tests succeed:
Prelogin error: host <connection_host> port <connection_port> Error reading prelogin response: Read timed out ClientConnectionId: <client_connection_id>
Environment
- Connector: SQL Server
- Connection method: Fivetran Proxy Agent
Resolution
To troubleshoot this issue, complete the following steps:
Test SQL Server connectivity from the Proxy Agent host
Ask your database or network team to establish a direct SQL Server connection from the same machine where the Fivetran Proxy Agent is running. Run the following command:
sqlcmd -S tcp:<host>,1433 -U <username> -P '<password>' -d <database> -l 30 -Q "SELECT 1"
Replace the placeholders with your SQL Server connection details. Replace the port 1433 if your configured SQL Server port differs. Check whether the command completes successfully or times out.
Step 2: Review SQL Server logs and resource utilization
Ask your database team to check for the following around the time of the failed connection:
- Connection or pre-login errors in the SQL Server error logs.
- High CPU, memory, or disk I/O utilization.
- Connection processing delays or resource contention.
- Recent configuration changes or maintenance.
Step 3: Verify network connectivity
Work with your network team to check for the following between the Proxy Agent host and SQL Server:
- Firewall or network security rules affecting SQL Server traffic.
- VPN or routing issues.
- Packet inspection or network devices introducing delays.
- Intermittent latency or packet loss.
Step 4: Interpret the test results
If sqlcmd also times out, work with your database and network teams to investigate the connection path and SQL Server performance.
If sqlcmd succeeds but the Fivetran connection test fails, contact our support team. Include the test results, timestamps, and relevant SQL Server logs so we can investigate differences between the direct connection and our connection attempt.
Expected outcome
These checks help narrow down whether the timeout is related to SQL Server, the network, or the Proxy Agent connection path. A successful sqlcmd test confirms that the Proxy Agent host can connect directly to SQL Server using the tested configuration.
Cause
This issue occurs when SQL Server doesn't return a pre-login response within the timeout window. Possible causes include SQL Server resource contention, connection processing delays, firewall or proxy inspection, and network latency or packet loss.