Содержание
- Fix SQL Server Error 121 – The Semaphore Timeout Period Has Expired
- SQL Server Error 121 The Semaphore Timeout Period Has Expired – Root Cause
- Solution
- Check TCPIP settings
- Review Network Packet Size
- TCP Chimney Offload
- Validate Network related Driver Issues
- Net use error 121
- Asked by:
- Question
- All replies
- Net use error 121
- Asked by:
- Question
- All replies
Fix SQL Server Error 121 – The Semaphore Timeout Period Has Expired
by Manvendra Deo Singh · Published June 15, 2021 · Updated June 15, 2021
Yesterday one of my teammate got a weird error while executing a T-SQL script. We are talking about SQL Server error 121 the semaphore timeout period has expired. Error details are showing below:
A transport-level error has occured when receiving results from the server. (provider: TCP Provider, error: 0 – The semaphore timeout period has expired.) (Microsoft SQL Server, Error:121)
This was an intermittent issue and when we were executing the script from other server it was not throwing any issue. I did some research on this and found out that this error came because of unstable network connectivity.
SQL Server Error 121 The Semaphore Timeout Period Has Expired – Root Cause
There are various parameters that can affect network connectivity like network adaptors, packet drop, configured packet size etc. So i would suggest first you should connect to your network team and ask them to look into this issue. If network team has not found anything then you need to check application level network configurations at your level.
You should ask some questions to your network resource like whether any network packet drop being observed or not, or is there any NIC card issue etc. Let’s assume you have already reached out to network team and they haven’t found anything. I would suggest you to look into below options at your level to make sure everything is in place and not misconfigured.
- Check TCPIP settings
- Ensure you have appropriate network packet size configured in SQL Server
- Make sure you have properly configured TCP Chimney Offload
- Validate you don’t have Network Interface Card (NIC) driver issue, you can get it checked with your network team
Solution
I have already described high level areas where you need to look in in above section. Let’s discuss them further here.
Check TCPIP settings
You should open SQL Server configuration manager and check whether TCP configuration is properly done or not. Make sure to review all settings in SQL Server Network configuration settings. You should also read below article about this settings which causes a network error.
Review Network Packet Size
You should also review network packet size configuration in SQL Server. This could be one of the possible reason for this issue. Ideally we should not change the default value of this setting and keep it as it is until you have a specific requirement to change network packet size. Read below article to understand and learn network packet size in SQL Server and also step by step process about how to change the network packet size to your desired value.
TCP Chimney Offload
This settings is very important if we have network related connectivity issue. TCP Chimney Offload is a networking technology that helps transfer the workload from the CPU to a network adapter during network data transfer. It can be enabled or disabled in the following two locations:
- The operating system
- The advanced properties page of the network adapter
TCP Chimney Offload will work only if it is enabled in both locations. By default, TCP Chimney Offload is disabled in both these locations. However, OEM installations may enable TCP Chimney Offload in the operating system, in the network adapter, or in both the operating system and the network adapter.
You should speak to your network resource and Windows OS platform resource and validate all drivers at OS layer and network layer should be up to date and they should not have any issue. Make sure to update the drivers if you found any issue any of these layer.
I hope you can fix your issue by following above steps mentioned in this article. Comment us how you have fixed this issue, the semaphore timeout period has expired.) (Microsoft SQL Server, Error:121)
Источник
Net use error 121
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Asked by:
Question
Trying to access a file server running on Windows 2008 R2 Enterprise from a client which is Windows 2003 64 Bit SP2 using the below method ,
\ sharename — Gives the error message
\server IPsharename is nto accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions
The specified network name is no longer available
Please take a look below article.
so what about «server IPsharename is nto accessible. You might not have permission to use this network resource.»?
Please post an unedited ipconfig /all from both servers here.
Meinolf Weber
MVP, MCP, MCTS
Microsoft MVP — Directory Services
My Blog: http://msmvps.com/blogs/mweber/
Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
so what about «server IPsharename is nto accessible. You might not have permission to use this network resource.»?
Please post an unedited ipconfig /all from both servers here.
Meinolf Weber
MVP, MCP, MCTS
Microsoft MVP — Directory Services
My Blog: http://msmvps.com/blogs/mweber/
Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
File server — ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : blades-ftp
Primary Dns Suffix . . . . . . . : bladeslab.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : bladeslab.com
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection
Physical Address. . . . . . . . . : 00-50-56-B0-00-47
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::d15:b601:baf1:2ba0%10(Preferred)
IPv4 Address. . . . . . . . . . . : 16.84.188.150(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.252.0
Default Gateway . . . . . . . . . : 16.84.188.1
DHCPv6 IAID . . . . . . . . . . . : 234901590
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-16-D0-4E-29-00-50-56-B0-00-47
DNS Servers . . . . . . . . . . . : 16.110.135.51
16.110.135.52
NetBIOS over Tcpip. . . . . . . . : Enabled
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter Local Area Connection* 12:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2001:0:9d38:953c:30ee:8ca:efab:4369(Prefe
rred)
Link-local IPv6 Address . . . . . : fe80::30ee:8ca:efab:4369%13(Preferred)
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Disabled
Tunnel adapter 6TO4 Adapter:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft 6to4 Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2002:1054:bc96::1054:bc96(Preferred)
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : 16.110.135.51
16.110.135.52
NetBIOS over Tcpip. . . . . . . . : Disabled
Client — ipconfig /all
C:Documents and SettingsAdministrator>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : qtp-mat
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection 4:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : HP NC382i DP Multifunction Gigabit Server
Adapter #4
Physical Address. . . . . . . . . : 78-E7-D1-94-3F-04
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 10.0.0.18
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . :
Ethernet adapter Local Area Connection 3:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : HP NC382i DP Multifunction Gigabit Server
Adapter #3
Physical Address. . . . . . . . . : 78-E7-D1-94-3F-02
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 16.84.192.221
Subnet Mask . . . . . . . . . . . : 255.255.252.0
Default Gateway . . . . . . . . . : 16.84.192.1
DNS Servers . . . . . . . . . . . : 16.110.135.51
16.110.135.52
10.0.0.2
Am able to ping from one server to other server.
Источник
Net use error 121
This forum has migrated to Microsoft Q&A. Visit Microsoft Q&A to post new questions.
Asked by:
Question
Trying to access a file server running on Windows 2008 R2 Enterprise from a client which is Windows 2003 64 Bit SP2 using the below method ,
\ sharename — Gives the error message
\server IPsharename is nto accessible. You might not have permission to use this network resource. Contact the administrator of this server to find out if you have access permissions
The specified network name is no longer available
Please take a look below article.
so what about «server IPsharename is nto accessible. You might not have permission to use this network resource.»?
Please post an unedited ipconfig /all from both servers here.
Meinolf Weber
MVP, MCP, MCTS
Microsoft MVP — Directory Services
My Blog: http://msmvps.com/blogs/mweber/
Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
so what about «server IPsharename is nto accessible. You might not have permission to use this network resource.»?
Please post an unedited ipconfig /all from both servers here.
Meinolf Weber
MVP, MCP, MCTS
Microsoft MVP — Directory Services
My Blog: http://msmvps.com/blogs/mweber/
Disclaimer: This posting is provided AS IS with no warranties or guarantees and confers no rights.
File server — ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : blades-ftp
Primary Dns Suffix . . . . . . . : bladeslab.com
Node Type . . . . . . . . . . . . : Hybrid
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : bladeslab.com
Ethernet adapter Local Area Connection:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Intel(R) PRO/1000 MT Network Connection
Physical Address. . . . . . . . . : 00-50-56-B0-00-47
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::d15:b601:baf1:2ba0%10(Preferred)
IPv4 Address. . . . . . . . . . . : 16.84.188.150(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.252.0
Default Gateway . . . . . . . . . : 16.84.188.1
DHCPv6 IAID . . . . . . . . . . . : 234901590
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-16-D0-4E-29-00-50-56-B0-00-47
DNS Servers . . . . . . . . . . . : 16.110.135.51
16.110.135.52
NetBIOS over Tcpip. . . . . . . . : Enabled
Media State . . . . . . . . . . . : Media disconnected
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft ISATAP Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Tunnel adapter Local Area Connection* 12:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Teredo Tunneling Pseudo-Interface
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2001:0:9d38:953c:30ee:8ca:efab:4369(Prefe
rred)
Link-local IPv6 Address . . . . . : fe80::30ee:8ca:efab:4369%13(Preferred)
Default Gateway . . . . . . . . . :
NetBIOS over Tcpip. . . . . . . . : Disabled
Tunnel adapter 6TO4 Adapter:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Microsoft 6to4 Adapter
Physical Address. . . . . . . . . : 00-00-00-00-00-00-00-E0
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
IPv6 Address. . . . . . . . . . . : 2002:1054:bc96::1054:bc96(Preferred)
Default Gateway . . . . . . . . . :
DNS Servers . . . . . . . . . . . : 16.110.135.51
16.110.135.52
NetBIOS over Tcpip. . . . . . . . : Disabled
Client — ipconfig /all
C:Documents and SettingsAdministrator>ipconfig /all
Windows IP Configuration
Host Name . . . . . . . . . . . . : qtp-mat
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
Ethernet adapter Local Area Connection 4:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : HP NC382i DP Multifunction Gigabit Server
Adapter #4
Physical Address. . . . . . . . . : 78-E7-D1-94-3F-04
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 10.0.0.18
Subnet Mask . . . . . . . . . . . : 255.0.0.0
Default Gateway . . . . . . . . . :
Ethernet adapter Local Area Connection 3:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : HP NC382i DP Multifunction Gigabit Server
Adapter #3
Physical Address. . . . . . . . . : 78-E7-D1-94-3F-02
DHCP Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 16.84.192.221
Subnet Mask . . . . . . . . . . . : 255.255.252.0
Default Gateway . . . . . . . . . : 16.84.192.1
DNS Servers . . . . . . . . . . . : 16.110.135.51
16.110.135.52
10.0.0.2
Am able to ping from one server to other server.
Источник
The semaphore timeout period has expired and not sure what to do? Read on to find out how to solve the SQL error 121.
At Bobcares, we offer solutions for every query, big and small, as a part of our Server Management Services.
Let’s take a look at how our Support Team is ready to help customers when the semaphore timeout period has expired.
How to resolve: The semaphore timeout period has expired
One of our customers recently found themselves facing the following error while executing a T-SQL script:
A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 – The semaphore timeout period has expired.) (Microsoft SQL Server, Error:121)
According to our proficient Support Team, this error is due to unstable network connectivity. The unstable network may be due to various parameters like:
- Incorrect TCPIP settings
- Inappropriate network packet size configured in SQL Server
- Improperly configured TCP Chimney Offload
- Network Interface Card (NIC) driver issue
Our Support Team has put together this guide to help you troubleshoot the reason behind the unstable network.
How to check TCPIP Settings
- First, open the SQL Server configuration manager and verify the TCP configuration settings.
- Then, verify all the settings on the SQL Server Network configuration settings as well.
If you require further assistance, this article will come in handy.
How to review Network Packet Size
The next troubleshooting tip involves reviewing the network packet size configuration in SQL Server. Preferably, it is better to stick to the default value and change it only if we have a particular requirement to change network packet size. We can change the value easily by referring to this article.
How to review TCP Chimney Offload
In case we are facing a network-related connectivity issue it is essential to review the TCP Chimney Offload setting. It is a networking technology responsible for transferring the workload from the CPU to a network adapter for the duration of the network data transfer. We can either enable or disable this feature at both of the following locations:
- Operating system
- Advanced properties page of the network adapter
Our Support Techs would like to point out that the TCP Chimney Offload features works only if we enable the feature at both locations. It is usually disabled by default at both these locations. However, OEM installation tends to enable the feature in the operating system, network adapter, or both.
How to validate Network related Driver Issues
This troubleshooting tip involves validating all the drivers at the OS and network layer by checking whether they are up-to-date and have no issue. In case we find any issue at any layer, we have to update the drivers.
[Looking for a solution to another query? We are just a click away.]
Conclusion
In conclusion, our skilled Support Techs at Bobcares demonstrated what to do when the semaphore timeout period has expired and you come across SQL error 121.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
GET STARTED
Hi everybody,
I am using a Mlx90614 sensor and sporadically receive an exception running on RaspPi.
This issue seems to be similar to #163
My code looks like this:
var settings = new I2cConnectionSettings(busId, i2CAddress); using (I2cDevice i2c = I2cDevice.Create(settings)) { using Mlx90614 sensor = new Mlx90614(i2c); logger.Debug(" Got Mlx90614 sensor object"); Iot.Units.Temperature irtemperature = sensor.ReadObjectTemperature(); Iot.Units.Temperature ambientTemperature = sensor.ReadAmbientTemperature(); logger.Debug($"Reading Mlx90614 temperatures done"); }
I am creating the I2C device object every 5 seconds, because I have to create antoher I2c device object with different settings (for BME280) and I don’t know if it is ok to have multiple at the same time.
Expected behavior
no error ;
Actual behavior
sporadically I receive the following exception:
2019-10-30 22:33:14.869 +01:00 [INF] Error while using Mlx90614Reader: Error 121 performing I2C data transfer.
System.IO.IOException: Error 121 performing I2C data transfer.
at System.Device.I2c.UnixI2cDevice.ReadWriteInterfaceTransfer(Byte* writeBuffer, Byte* readBuffer, Int32 writeBufferLength, Int32 readBufferLength)
at System.Device.I2c.UnixI2cDevice.Transfer(Byte* writeBuffer, Byte* readBuffer, Int32 writeBufferLength, Int32 readBufferLength)
at System.Device.I2c.UnixI2cDevice.WriteRead(ReadOnlySpan1 writeBuffer, Span
1 readBuffer)
at Iot.Device.Mlx90614.Mlx90614.ReadTemperature(Byte register)
at Iot.Device.Mlx90614.Mlx90614.ReadAmbientTemperature()
at Herzonaut.ObservingConditions.Raspi.Sensor.Mlx90614Reader.GetSensorDataInternal(I2cDevice i2cDevice) in C:ddnHerzonautgitmasterHerzonaut.ObservingConditions.Raspi.SensorMlx90614Reader.cs:line 30
at Herzonaut.ObservingConditions.Raspi.Sensor.AbstractI2CSensorReader`1.GetSensorData() in C:ddnHerzonautgitmasterHerzonaut.ObservingConditions.Raspi.SensorAbstractI2CSensorReader.cs:line 39
Versions used
System.Device.Giop 1.0.0
Iot.Device.Bindings 1.0.0
Add following information:
dotnet --info
on the machine being used to build
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: Windows
OS Version: 10.0.17763
OS Platform: Windows
RID: win10-x64
Base Path: C:Program Filesdotnetsdk3.0.100
Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33
.NET Core SDKs installed:
2.1.701 [C:Program Filesdotnetsdk]
2.1.801 [C:Program Filesdotnetsdk]
2.1.802 [C:Program Filesdotnetsdk]
2.2.301 [C:Program Filesdotnetsdk]
2.2.401 [C:Program Filesdotnetsdk]
2.2.402 [C:Program Filesdotnetsdk]
3.0.100 [C:Program Filesdotnetsdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.2 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.12 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.13 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.6 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.7 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.2 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.12 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.13 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.6 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.7 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [C:Program FilesdotnetsharedMicrosoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.12 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.1.13 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.2.6 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 2.2.7 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [C:Program FilesdotnetsharedMicrosoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:Program FilesdotnetsharedMicrosoft.WindowsDesktop.App]
dotnet --info
on the machine where app is being run (not applicable for self-contained apps)
.NET Core SDK (reflecting any global.json):
Version: 3.0.100
Commit: 04339c3a26
Runtime Environment:
OS Name: raspbian
OS Version: 10
OS Platform: Linux
RID: linux-arm
Base Path: /home/pi/astro/dotnet3/sdk/3.0.100/
Host (useful for support):
Version: 3.0.0
Commit: 7d57652f33
.NET Core SDKs installed:
3.0.100 [/home/pi/astro/dotnet3/sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.App 3.0.0 [/home/pi/astro/dotnet3/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.0.0 [/home/pi/astro/dotnet3/shared/Microsoft.NETCore.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
- Version of
System.Device.Gpio
: 1.0.0 - Version of
Iot.Device.Bindings
package 1.0.0
- Remove From My Forums
-
Question
-
when I used a buffer array which is from the first harddisk read by readfile function,then write this buffer to another harddisk writed by writefile function.there is something wrong that when I read the first harddisk again by readfile function,it will
delay about 10 seconds after reach readfile function,I hope someone can help me solve this problem,firstly,thanks!
Answers
-
>I got the error 121 by getlasterror().
«The semaphore timeout period has expired.»
— Wayne
-
Marked as answer by
Tuesday, April 26, 2011 9:10 AM
-
Marked as answer by
-
Hi Jemney,
According to the System information, error code 121 is
The semaphore timeout period has expired just like Wayne’s reply.
It may be a problem with the connection. Please make sure that you have connected your hard disk correctly and set the right path in your codes.
This error also appears to be associated with the files which name are too long or the paths that are too long. Please try to rename your file or move your file into root folder.In order to resolve your issue, could you please give me some sample or show me some codes of your issue?
I hope my suggestion can help you to resolve your issue. If anything is unclear , please feel free and let me know.
Best Regards,
Rob
Rob Pan [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.-
Marked as answer by
Rob Pan
Tuesday, April 26, 2011 9:10 AM
-
Marked as answer by
Yesterday one of my teammate got a weird error while executing a T-SQL script. We are talking about SQL Server error 121 the semaphore timeout period has expired. Error details are showing below:
A transport-level error has occured when receiving results from the server. (provider: TCP Provider, error: 0 – The semaphore timeout period has expired.) (Microsoft SQL Server, Error:121)
This was an intermittent issue and when we were executing the script from other server it was not throwing any issue. I did some research on this and found out that this error came because of unstable network connectivity.
SQL Server Error 121 The Semaphore Timeout Period Has Expired – Root Cause
There are various parameters that can affect network connectivity like network adaptors, packet drop, configured packet size etc. So i would suggest first you should connect to your network team and ask them to look into this issue. If network team has not found anything then you need to check application level network configurations at your level.
You should ask some questions to your network resource like whether any network packet drop being observed or not, or is there any NIC card issue etc. Let’s assume you have already reached out to network team and they haven’t found anything. I would suggest you to look into below options at your level to make sure everything is in place and not misconfigured.
- Check TCPIP settings
- Ensure you have appropriate network packet size configured in SQL Server
- Make sure you have properly configured TCP Chimney Offload
- Validate you don’t have Network Interface Card (NIC) driver issue, you can get it checked with your network team
Solution
I have already described high level areas where you need to look in in above section. Let’s discuss them further here.
Check TCPIP settings
You should open SQL Server configuration manager and check whether TCP configuration is properly done or not. Make sure to review all settings in SQL Server Network configuration settings. You should also read below article about this settings which causes a network error.
- Fix: SQL Network Interfaces Error 28 – Server doesn’t support requested protocol
Review Network Packet Size
You should also review network packet size configuration in SQL Server. This could be one of the possible reason for this issue. Ideally we should not change the default value of this setting and keep it as it is until you have a specific requirement to change network packet size. Read below article to understand and learn network packet size in SQL Server and also step by step process about how to change the network packet size to your desired value.
- How to Change Network Packet Size Configuration in SQL Server
TCP Chimney Offload
This settings is very important if we have network related connectivity issue. TCP Chimney Offload is a networking technology that helps transfer the workload from the CPU to a network adapter during network data transfer. It can be enabled or disabled in the following two locations:
- The operating system
- The advanced properties page of the network adapter
TCP Chimney Offload will work only if it is enabled in both locations. By default, TCP Chimney Offload is disabled in both these locations. However, OEM installations may enable TCP Chimney Offload in the operating system, in the network adapter, or in both the operating system and the network adapter.
Validate Network related Driver Issues
You should speak to your network resource and Windows OS platform resource and validate all drivers at OS layer and network layer should be up to date and they should not have any issue. Make sure to update the drivers if you found any issue any of these layer.
I hope you can fix your issue by following above steps mentioned in this article. Comment us how you have fixed this issue, the semaphore timeout period has expired.) (Microsoft SQL Server, Error:121)
Related Articles
- SQL Server Error 40: A network-related or instance-specific error occurred while establishing a connection to SQL Server.
- Fix Error 1418: The server network address cannot be reached or does not exist.
- Fix: SQL Network Interfaces Error 28 – Server doesn’t support requested protocol
- SQL Server Native Client Error 50000: A network error occurred while attempting to read from the file
- Author
- Recent Posts
I am working as a Technical Architect in one of the top IT consulting firm. I have expertise on all versions of SQL Server since SQL Server 2000. I have lead multiple SQL Server projects like consolidation, upgrades, migrations, HA & DR. I love to share my knowledge. You can contact me on my social accounts for any consulting work.