2016-03-10 51 views
0

我们在我们的项目中使用Azure ServiceBus将消息传递给不同的组件。目前我们有7个主题和45个订阅这些主题。 最近我们已经开始获取Microsoft.ServiceBus.Messaging.QuotaExceededException:ConnectionsQuotaExceeded for namespace。Azure ServiceBus ConnectionsQuotaExceeded for namespace

根据Azure ServiceBus Quotas and Limits每个命名空间的并发连接限制为1000.我们肯定不会超过200.是否有人有类似的问题?

下面是堆栈跟踪:

Microsoft.ServiceBus.Messaging.QuotaExceededException:ConnectionsQuotaExceeded命名空间testtrlsb。 d2759061-962d-436B-980D-1b901019d569_G51 ---> System.ServiceModel.FaultException 1[System.ServiceModel.ExceptionDetail]: ConnectionsQuotaExceeded for namespace testtrlsb. d2759061-962d-436b-980d-1b901019d569_G51Server stack trace:   at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.ThrowIfFaultMessage(Message wcfMessage) at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.HandleMessageReceived(IAsyncResult result)Exception rethrown at[0]:   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.Messaging.Sbmp.DuplexRequestBindingElement.DuplexRequestSessionChannel.DuplexCorrelationAsyncResult.End(IAsyncResult result) at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory 1.RequestSessionChannel.RequestAsyncResult.b__4(RequestAsyncResult thisPtr,IAsyncResult的R) 在Microsoft.ServiceBus.Messaging.IteratorAsyncResult 1.StepCallback(IAsyncResult result)Exception rethrown at[1]:   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory 1.RequestSessionChannel.EndRequest(IAsyncResult的结果) 在Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory 1.RedirectContainerSessionChannel.RequestAsyncResult.<>c__DisplayClass17.<GetAsyncSteps>b__a(RequestAsyncResult thisPtr, IAsyncResult r) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult 1.StepCallback(IAsyncResult的结果)在[2]异常重新抛出: 在Microsoft.ServiceBus.Common.AsyncResult.End [TAsyncResult](IAsyncResult的结果) 在Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory 1.RedirectContainerSessionChannel.EndRequest(IAsyncResult result) at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory 1.RequestSessionChannel.RequestAsyncResult.b__4(RequestAsyncResult thisPtr,IAsyncResult r) at Microsoft.ServiceB us.Messaging.IteratorAsyncResult 1.StepCallback(IAsyncResult result)Exception rethrown at[3]:   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory 1.RequestSessionChannel.EndRequest(IAsyncResult的结果) 在Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageReceiver.EndReceiveCommand(IAsyncResult的结果,IEnumerable的消息) 在Microsoft.ServiceBus.Messaging.MessageReceiver.EndReceive( IAsyncResult结果) at System.Threading.Tasks.TaskFactory 1.FromAsyncCoreLogic(IAsyncResult iar, Func 2 endFunction,Action 1 endAction, Task 1 promise,Boolean requireSynchronization)---抛出抛出异常的前一位置的堆栈跟踪结束--- at System.Runtime.CompilerServices.TaskAwaiter .ThrowForNonSuccess(任务任务) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Micros oft.ServiceBus.Messaging.SubscriptionClient.ReceiveAsync()

+0

连接未关闭? –

+0

您使用的是基本层吗?我认为它与基本较低。 –

回答

1

我们将很快更新消息传递异常文档。这些信息将在那里:

  1. 你可能有一个读者无法完成的消息并在锁定期满后的消息返回队列/主题。如果读者遇到阻止它调用BrokeredMessage.Complete的异常,就会发生这种情况。消息读取十次后,默认情况下它将移至死信队列。此行为由QueueDescription.MaxDeliveryCount属性控制,并具有默认值10.由于消息堆积在死信中,因此占用队列中的空间。要解决这个问题,请像读取其他队列一样读取并填写死信号队列中的消息。 QueueClient包含一个格式化死区路径的方法:QueueClient.FormatDeadLetterPath。

  2. 另一种可能性是读者已经停止接收来自队列或订阅的消息。识别这种情况的方法是查看QueueDescription.MessageCountDetails属性,该属性显示消息的完整分类。如果ActiveMessageCount高或增长,那么消息的读取速度不会像正在写入的那样快。