We have a Standard Azure Service Bus subscription. We have started seeing the following error today - Microsoft.ServiceBus: ConnectionsQuotaExceeded for namespace

Jadhav Vikrant (Contractor) 0 Reputation points
2024-10-16T16:55:52.0966667+00:00

We are sseing the following error when the applications are trying to connect ot the Azure Service Bus

2024-10-16T13:54:34.518 [Error] The listener for function 'AzureFunctionXXXXXXX' was unable to start. Microsoft.ServiceBus: ConnectionsQuotaExceeded for namespace YYYYYY. For more information please see https://aka.ms/ServiceBusExceptions . c59e05d7-94be-40c3-bfac-baf9241dece4_G9.

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
633 questions
{count} votes

1 answer

Sort by: Most helpful
  1. LeelaRajeshSayana-MSFT 15,886 Reputation points Microsoft Employee
    2024-10-16T17:57:08.2766667+00:00

    Hi @Jadhav Vikrant (Contractor) Greetings! Welcome to Microsoft Q&A forum. Thank you for posting this question here.

    The error message indicates that the maximum number of connections to the service bus namespace has reached, and it cannot process new connections t serve the function app. The issue is likely caused by two common scenarios

    1. Dead-letter queue A reader is failing to complete messages and the messages are returned to the queue/topic when the lock expires. It can happen if the reader encounters an exception that prevents it from calling BrokeredMessage.Complete. After a message has been read 10 times, it moves to the dead-letter queue by default. This behavior is controlled by the QueueDescription.MaxDeliveryCount property and has a default value of 10. As messages pile up in the dead letter queue, they take up space.

    To resolve the issue, read and complete the messages from the dead-letter queue, as you would from any other queue. You can either use Azure Service Bus Explorer that enables manual moving of messages between queues and topics or code like this can help move them all at once.

    1. Receiver stopped. A receiver has stopped receiving messages from a queue or subscription. The way to identify the issue is to look at the active message count. If the active message count is high or growing, then the messages aren't being read as fast as they're being written. Hope this helps to identify the cause for the issue. Please let us know if you need any additional assistance after reviewing the above mentioned steps.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.