Being Throttled by Azure Service Bus
Asked Answered
E

1

8

I'm getting the below exception in Windows Azure when I attempt to retrieve messages from the service bus.

Microsoft.ServiceBus.Messaging.ServerBusyException: The request was terminated because the entity is being throttled. Please wait 10 seconds and try again

The exception occures after calling the Receive method:

QueueClient queueClient = _messagingFactory.CreateQueueClient(queueName);
var brokeredMessage = queueClient.Receive(TimeSpan.Zero);

Is this configurable or am I putting to much demand on the message bus?

Elijaheliminate answered 12/7, 2012 at 18:48 Comment(8)
Here are the SB messaging quotas, if it will help: msdn.microsoft.com/en-us/library/windowsazure/ee732538.aspxLombardy
@Lombardy This was good information although I don't see anything that would indicate too many calls in X seconds, etc... Any idea which one of these may be hitting me?Elijaheliminate
do you just call this Receive only once from one client, or from multiple instances? If it is multiple instances, and you are not disposing, it might be client connections limit. Also, why don't you try the parameterless overload of Receive instead of specifying TimeSpan.Zero ?Lombardy
@Lombardy Ok, I'll take a closer look and see if thats the issue.Elijaheliminate
@Lombardy I have a client per queue, each running on their own thread, they use a spin wait pattern. Is that ok?Elijaheliminate
@Lombardy Do you know a way I can monitor the total number of connections I have open at any given time?Elijaheliminate
client per queue - shall be ok. as for monitoring number of connections - RDP and type in command prompt: "netstat -an" this shall give you a list of all connections in the host with their statuses (i.e. IDLE, ESTABLISHED, LISTENING, etc.) or use a TcpView from sysinternals. Don't have further ideas.Lombardy
@Lombardy Did a review of all my client closure/disposal routines... So far I haven't been able to recreate the throttling so this may be resolved now. Thanks for the clue.Elijaheliminate
K
3

Without knowing more than what you posted, it appears that you were taxing your Service Bus instance to the max. However, with this question originally being from almost 7 years ago, it's important to note that the Azure Service Bus scalability targets have increased much over this time.

You can reference this Azure documentation article for more information on the quotas and throttling thresholds for Azure Service Bus:

https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-quotas

Kura answered 16/1, 2019 at 17:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.