Azure SQL: provider: TCP Provider, error: 0 - The semaphore timeout period has expired

1k Views Asked by At

It's similar to this question, but it contains no fix: TCP Provider: The semaphore timeout period has expired

I am using the enterprise lib transient fault handling (v 6.x) with a retry policy. I have used it for years and this error is a new one. Perhaps due to Windows update on our webserver (win 2012r2)

So since there is no C# code changed and I am using the enterprise lib for ages... it must be windows/hardware related?

I have found this, saying it's winsock related and some source about usb drivers?

There is a known issue with vip swaps, but we are running the webapps (both webforms and mvc apps have this issue) from our own on prem 2012r2

Here is one of the stacktraces:

System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error)
System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value)
System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
System.Data.SqlClient.SqlDataReader.get_MetaData()
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption)
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
Shop.Dal.DB.<>c__DisplayClass2_0.<GetDatatable>b__0()
Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.<>c__DisplayClass1.<ExecuteAction>b__0()
Microsoft.Practices.EnterpriseLibrary.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func)
Shop.Dal.DB.GetDatatable(SqlCommand com) The semaphore timeout period has expired
0

There are 0 best solutions below