2

I am noticing a lot of semaphore time-outs (see below for full exception) when deploying an update to our Windows Azure Cloud Service.

We have implemented retry logic (and can see the exception is happening within the retry encapsulation) so I'm thinking it is probably a logical issue however I have not been able to find any related instances on the internet, nor factor my own solution!

My question is: Is there a way to handle this? For example can we somehow push all users on to a single instance and update the other? -currently we have two instances running at a minimum.

Here's the full exception:

[SqlException: A transport-level error has occurred when receiving results from the server. (provider: TCP Provider, error: 0 - The semaphore timeout period has expired.)]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction):0
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose):0
    System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject stateObj, UInt32 error):0
    System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync():0
    System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket():0
    System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer():0
    System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte& value):0
    System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady):0
    System.Data.SqlClient.SqlDataReader.TryConsumeMetaData():0
    System.Data.SqlClient.SqlDataReader.get_MetaData():0
    System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString):0
    System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite):0
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite):0
    System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method):0
    System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method):0
    System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior):0
    System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult):0
    System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries):0
    System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query):0
    System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression):0
    System.Linq.Queryable.SingleOrDefault[TSource](IQueryable`1 source):0
    Microsoft.Practices.TransientFaultHandling.RetryPolicy.ExecuteAction[TResult](Func`1 func):0
    TimeClock.TimeClockService.GetEmployees(String _apiKey, String _authenticationToken, DateTime _lastSync):0
Le-roy Staines
  • 2,037
  • 2
  • 22
  • 40
  • Me too. We've seen these sporadically for months on some Azure Websites but since the major Azure outage last week we're now getting them far more often. I will be raising a support ticket with Azure. Also, see [this answer](http://stackoverflow.com/a/26762061/251200) which points to [this thread](https://social.msdn.microsoft.com/Forums/azure/en-US/5e195f94-d4d2-4c2d-8a4e-7d66b4761510). – Matt Jenkins Nov 25 '14 at 21:01
  • Thanks @MattJenkins seems like this is due to a known bug with a very long-overdue fix. – Le-roy Staines Nov 27 '14 at 03:21

1 Answers1

0

Seems this is a known issue with a VIP swap, even with a SQL Retry strategy and hard-coded machine keys.

User reports of this issue on MSDN

Stack Overflow answer on another thread

Community
  • 1
  • 1
Le-roy Staines
  • 2,037
  • 2
  • 22
  • 40