The semaphore timeout period has expired.

Manisha Kottary (US) 1 Reputation point
2021-09-09T07:05:49.11+00:00

TITLE: Connect to Server || Cannot connect to managedinstancenew.public.61835e40804d.database.windows.net,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.
600 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ronen Ariely 15,096 Reputation points
    2021-09-09T08:13:01.887+00:00

    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: https://mskb.pkisolutions.com/kb/325487

    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