【问题标题】:Azure ServiceBus ConnectionsQuotaExceeded for namespaceAzure ServiceBus ConnectionsQuotaExceeded for namespace
【发布时间】:2016-03-10 10:06:34
【问题描述】:

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

根据Azure ServiceBus Quotas and Limits,每个命名空间的并发连接数限制为 1000。我们绝对不会超过 200。有人遇到类似问题吗?

下面是堆栈跟踪:

Microsoft.ServiceBus.Messaging.QuotaExceededException:命名空间 testtrlsb 的 ConnectionsQuotaExceeded。 d2759061-962d-436b-980d-1b901019d569_G51 ---> System.ServiceModel.FaultException1[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.ReconnectChannelFactory1.RequestSessionChannel.RequestAsyncResult.b__4(RequestAsyncResult thisPtr, IAsyncResult r) 在 Microsoft.ServiceBus.Messaging.IteratorAsyncResult1.StepCallback(IAsyncResult result)Exception rethrown at[1]:   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory1.RequestSessionChannel.EndRequest(IAsyncResult 结果) 在 Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory1.RedirectContainerSessionChannel.RequestAsyncResult.<>c__DisplayClass17.<GetAsyncSteps>b__a(RequestAsyncResult thisPtr, IAsyncResult r) at Microsoft.ServiceBus.Messaging.IteratorAsyncResult1.StepCallback(IAsyncResult 结果)在 [2] 处重新抛出异常: 在 Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult 结果) 在 Microsoft.ServiceBus.Messaging.Sbmp.RedirectBindingElement.RedirectContainerChannelFactory1.RedirectContainerSessionChannel.EndRequest(IAsyncResult result) at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory1.RequestSessionChannel.RequestAsyncResult.b__4(RequestAsyncResult thisPtr,IAsyncResult r) 在 Microsoft.ServiceBus.Messaging.IteratorAsyncResult1.StepCallback(IAsyncResult result)Exception rethrown at[3]:   at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.Messaging.Channels.ReconnectBindingElement.ReconnectChannelFactory1.RequestSessionChannel.EndRequest(IAsyncResult 结果) 在 Microsoft.ServiceBus.Messaging.Sbmp.SbmpMessageReceiver.EndReceiveCommand(IAsyncResult 结果,IEnumerable1& messages)   --- End of inner exception stack trace --- at Microsoft.ServiceBus.Common.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.ServiceBus.Messaging.MessageReceiver.RetryReceiveAsyncResult.TryReceiveEnd(IAsyncResult r, IEnumerable1& 消息) 在 Microsoft.ServiceBus.Messaging.MessageReceiver.EndReceive(IAsyncResult 结果) 在 System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization)--- 从之前抛出异常的位置结束堆栈跟踪--- 在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(任务任务) 在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(任务任务) 在 Microsoft.ServiceBus.Messaging.SubscriptionClient.ReceiveAsync()

【问题讨论】:

  • 连接没有被关闭?
  • 您使用的是基本层吗?我认为使用 Basic 会更低。

标签: azure azureservicebus servicebus


【解决方案1】:

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

  1. 您可能有一个阅读器未能完成消息,并且在锁定到期时消息将返回到队列/主题。如果阅读器遇到阻止其调用 BrokeredMessage.Complete 的异常,则可能会发生这种情况。默认情况下,一条消息被阅读十次后将移至死信队列。此行为由 QueueDescription.MaxDeliveryCount 属性控制,默认值为 10。当消息在死信中堆积时,它们会占用队列中的空间。要解决此问题,请像从任何其他队列中一样读取并完成死信队列中的消息。 QueueClient 包含一个格式化死信路径的方法:QueueClient.FormatDeadLetterPath。

  2. 另一种可能性是阅读器已停止接收来自队列或订阅的消息。识别这一点的方法是查看 QueueDescription.MessageCountDetails 属性,该属性显示了消息的完整细分。如果 ActiveMessageCount 很高或正在增长,则消息的读取速度不如写入速度。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-08-20
    • 2021-05-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多