none
Connection Time Out Error RRS feed

  • Question

  • 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=193; handshake=29920;  (.Net SqlClient Data Provider)

    ------------------------------
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=-2&LinkId=20476

    ------------------------------
    Server Name: 176.74.30.190
    Error Number: -2
    Severity: 11
    State: 0


    ------------------------------
    Program Location:

       at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)
       at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
       at System.Data.SqlClient.SqlConnection.Open()
       at Microsoft.SqlServer.Management.SqlStudio.Explorer.ObjectExplorerService.ValidateConnection(UIConnectionInfo ci, IServerType server)
       at Microsoft.SqlServer.Management.UI.ConnectionDlg.Connector.ConnectionThreadUser()

    ===================================

    The wait operation timed out
    Thursday, December 5, 2019 8:16 AM

All replies

  • 1. The SQL Server Browser service is not running.
    2. The TCP/IP is disabled (Check the TCP/IP protocol for the server in Configuration Manager - Make sure IP4 and IP6 are both enabled).
    3. There are network problems.

    Best Regards,Uri Dimant SQL Server MVP, http://sqlblog.com/blogs/uri_dimant/

    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting: Large scale of database and data cleansing
    Remote DBA Services: Improves MS SQL Database Performance
    SQL Server Integration Services: Business Intelligence

    Thursday, December 5, 2019 9:40 AM
  • Hi Prajakta,
    The error usually occurs in below Situations:

    1. An instance of the SQL Server Database Engine is not running.
    2. The SQL Server Browser service is not running.
    3. The TCP/IP is disabled.
    4. The server name was typed incorrectly.
    5. There are network problems.
    6. The TCP/IP port for the Database Engine instance is blocked by a firewall.
    7. The client and server are not configured to use the same network protocol.

    For more information, please refer to following links:
    https://blog.devoworx.net/2017/01/30/connection-timeout-expired-pre-login-handshake/
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/b9d72d86-b53b-4275-bd1b-edf9517b6383/connection-time-out-error? forum=sqlgetstarted

    Best regards,
    Cris


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, December 6, 2019 7:36 AM
  • The error usually occurs in below Situations:

    1. An instance of the SQL Server Database Engine is not running.
    2. The SQL Server Browser service is not running.
    3. The TCP/IP is disabled.
    4. The server name was typed incorrectly.
    5. There are network problems.
    6. The TCP/IP port for the Database Engine instance is blocked by a firewall.
    7. The client and server are not configured to use the same network protocol.

    Nope Cris, no cigar here.

    The error message indicates that SQL Server is indeed reached, but something goes wrong during the "pre-login handshake". I will have to admit that I'm not too familiar with this situation (which is why I did not respond initially), but network issues seems like a possible reason. The server being severely overtaxed and therefore not responding in time could be another. Some of these login failures can also indicate connection problems to the AD (Active Directory), but I don't think we have come this far at the pre-login handshake.

    Does this happens constantly or only occasionally? The only concrete advice I can give is to increase the connection timeout, but I don't know whether that is a good advice or not.


    Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

    Friday, December 6, 2019 10:41 PM