The semaphore timeout period has expired.

Manisha Kottary (US) 1 Reputation point

TITLE: Connect to Server || Cannot connect to,3342. || ADDITIONAL INFORMATION: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.) (Microsoft SQL Server, Error: 121)

I get the above error message while I try connecting my SSMS to Azure SQL managed instance. Please help me out with this.

SQL Server on Azure Virtual Machines
Azure DNS
Azure DNS
An Azure service that enables hosting Domain Name System (DNS) domains in Azure.
449 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ronen Ariely 14,646 Reputation points MVP

    Good day,

    Error 121: "The semaphore timeout period has expired" is a network related error, not a SQL Server timeout. The source of the issue can be related to your VPN if you are using a VPN or to Network connectivity problems

    Network connectivity problems have various causes, but they typically occur because of incorrect network adapters, incorrect switch settings, faulty hardware, or driver issues. Some connectivity symptoms are intermittent and do not clearly point to any one of these causes.

    You can get more information in this post:

    Note: You can increase the time-out setting value of the SSMS connection configuration. This will solve the issue but will bypass it in some cases.

    Note! I do not remember that I got this error when using Azure SQL managed instance but as mentioned it is known when using on-premises server as related to Network connectivity problems

    0 comments No comments