Microsoft Azure 服务总线超时异常

7
我们有一个应用程序在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那边有问题还是我们漏掉了什么?

如果您遇到类似的超时问题,请参见http://stackoverflow.com/questions/30224200/azure-service-bus-topic-timeout-exception/38847121#38847121。 - Ralph Willgoss
2个回答

3
几周前,我们的Service Bus应用程序突然出现了无法解释的定时问题。这个应用程序已经在生产环境中运行了很多个月,我们的应用程序依然可以正常工作,但是有些调用会花费10秒或更长时间,而通常情况下只需100到200毫秒。这种情况持续了几周,我大部分时间都在尝试找出问题所在,但最终未能找到原因,因为问题突然消失了。
我们确实发现,在问题出现期间,我们在同一数据中心和其他数据中心创建的新的Service Bus命名空间没有出现相同的问题。Service Bus团队没有提供任何帮助,并且只会说响应时间不能保证,只有SLA才能保证。

1
当我的运行代码开始生成超时异常时,我遇到了类似的问题。经过研究发现防火墙阻止了通信所使用的端口。然而,端口80和443仍然开放。因此,添加以下代码行对我有用:
ServiceBusEnvironment.SystemConnectivity.Mode = ConnectivityMode.Https;

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接