我们有一个应用程序在Microsoft Azure云平台上运行。某些组件之间的通信是使用Service Bus进行的。一切都很顺利,直到最近我们开始收到以下类型的超时异常:
调用QueueClient x.Send(...)时:
Exception rethrown at [0]: 在 Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 在 Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End(IAsyncResult result) 在 Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory `1.RequestSessionChannel.RequestAsyncResult.b__4(RequestAsyncResult thisPtr, IAsyncResult r) 在 Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
调用NamespaceManager x.GetQueue(...)时:
PROGRESS队列处理失败。 System.TimeoutException:请求在60000毫秒后超时。无法确定请求的成功完成。应进行其他查询以确定操作是否成功。 TrackingId:bdffb6bd-5367-4573-aaa3-8ea9a03f5a2b,TimeStamp:5/28/2015 8:39:46 AM ---> System.Net.WebException:请求已中止:请求已取消。在 System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
在 Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.GetAsyncResult`1.b__49(GetAsyncResult`1 thisPtr, IAsyncResult r) 在 Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
调用NamespaceManager x.SubscriptionExists(...)时:
执行周期性工作时出现异常:System.TimeoutException:请求在00:10:00毫秒后超时。无法确定请求的成功完成。应进行其他查询以确定操作是否成功。服务器堆栈跟踪:Exception rethrown at [0]: 在 Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 在 Microsoft.ServiceBus.NamespaceManager.OnEndSubscriptionExists(IAsyncResult result) 在 Microsoft.ServiceBus.NamespaceManager.SubscriptionExists(String topicPath, String name) ...
调用QueueClient x.Receive(...)时:
PROGRESS队列处理失败。Microsoft.ServiceBus.Messaging.MessagingCommunicationException:与Service Bus通信时出错。检查连接信息,然后重试。---> System.ServiceModel.CommunicationObjectFaultedException:内部服务器错误:服务器没有提供有意义的回复;这可能是由于会话过早关闭引起的。TrackingId:04ba0220-0350-4806-9c65-c2bba9671054,Timestamp:28.05.2015 13:00:55服务器堆栈跟踪:异常在[0]处重新抛出:在Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)中 在Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)中 在Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End(IAsyncResult result)中 在Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.EndRequest(IAsyncResult result)中 在Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.b__4(RequestAsyncResult thisPtr,IAsyncResult r)中 在Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)中......
这些异常明显与ServiceBus相关,并且它们是不确定性的。抛出它们的函数,例如Send、GetQueue、SubscriptionExists,每分钟最多调用100-120次。我们在代码中什么也没改,增加超时值(甚至到荒谬的高值,如10分钟)也没有帮助。此外,我们不认为这是某些网络相关问题(在我们这边),因为当从不同的位置运行应用程序时,相同的错误会发生。是否还有其他人最近遇到这种异常?Microsoft那边有问题还是我们漏掉了什么?
调用QueueClient x.Send(...)时:
Exception rethrown at [0]: 在 Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 在 Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End(IAsyncResult result) 在 Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory `1.RequestSessionChannel.RequestAsyncResult.b__4(RequestAsyncResult thisPtr, IAsyncResult r) 在 Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
调用NamespaceManager x.GetQueue(...)时:
PROGRESS队列处理失败。 System.TimeoutException:请求在60000毫秒后超时。无法确定请求的成功完成。应进行其他查询以确定操作是否成功。 TrackingId:bdffb6bd-5367-4573-aaa3-8ea9a03f5a2b,TimeStamp:5/28/2015 8:39:46 AM ---> System.Net.WebException:请求已中止:请求已取消。在 System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
在 Microsoft.ServiceBus.Messaging.ServiceBusResourceOperations.GetAsyncResult`1.b__49(GetAsyncResult`1 thisPtr, IAsyncResult r) 在 Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)
调用NamespaceManager x.SubscriptionExists(...)时:
执行周期性工作时出现异常:System.TimeoutException:请求在00:10:00毫秒后超时。无法确定请求的成功完成。应进行其他查询以确定操作是否成功。服务器堆栈跟踪:Exception rethrown at [0]: 在 Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) 在 Microsoft.ServiceBus.NamespaceManager.OnEndSubscriptionExists(IAsyncResult result) 在 Microsoft.ServiceBus.NamespaceManager.SubscriptionExists(String topicPath, String name) ...
调用QueueClient x.Receive(...)时:
PROGRESS队列处理失败。Microsoft.ServiceBus.Messaging.MessagingCommunicationException:与Service Bus通信时出错。检查连接信息,然后重试。---> System.ServiceModel.CommunicationObjectFaultedException:内部服务器错误:服务器没有提供有意义的回复;这可能是由于会话过早关闭引起的。TrackingId:04ba0220-0350-4806-9c65-c2bba9671054,Timestamp:28.05.2015 13:00:55服务器堆栈跟踪:异常在[0]处重新抛出:在Microsoft.ServiceBus.Common.ExceptionDispatcher.Throw(Exception exception)中 在Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)中 在Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End(IAsyncResult result)中 在Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.EndRequest(IAsyncResult result)中 在Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory`1.RequestSessionChannel.RequestAsyncResult.b__4(RequestAsyncResult thisPtr,IAsyncResult r)中 在Microsoft.ServiceBus.Messaging.IteratorAsyncResult`1.StepCallback(IAsyncResult result)中......
这些异常明显与ServiceBus相关,并且它们是不确定性的。抛出它们的函数,例如Send、GetQueue、SubscriptionExists,每分钟最多调用100-120次。我们在代码中什么也没改,增加超时值(甚至到荒谬的高值,如10分钟)也没有帮助。此外,我们不认为这是某些网络相关问题(在我们这边),因为当从不同的位置运行应用程序时,相同的错误会发生。是否还有其他人最近遇到这种异常?Microsoft那边有问题还是我们漏掉了什么?