Loading...

[EventHub] Types of Throttling Errors and how to mitigate it

[EventHub] Types of Throttling Errors and how to mitigate it

Are you getting 50002 Error or 50008 Error return code in your EventHub? If that’s the case, you are in the right place.

In this documentation, we will go through what these two return codes are and how to prevent your EventHub to throttle.

 

 

[50002 Error - ServerBusyException]

Pre-requisite:

Are you getting 50002 Error from your EventHub? Is your Throughput appropriately configured? Is your load evenly distributed across all partitions? If so, keep on scrolling down, as you may find the answer to your problem.

 

I. What is a Throughput Unit?

The throughput capacity of Event Hubs is controlled by throughput units (TU). If the TU has gone beyond limit, EventHub is throttled and a ServerBusyException is returned. For more detailed information please visit aka.ms/event-hubs-scalability.

 

II. What is 50002 Error and throttling request?

50002 error occurs when EventHub indicates that a server is overloaded and returns ServerBusyException.

There are two good reasons why you are getting 50002 error. It can mean that your TU capacity has surpassed it’s capacity. Thus, you may need to increase the TU accordingly.

Another reason could be, that your load is not being distributed evenly across all partitions causing a overload to a partition or partitions.

 

III. What are the resolutions and how to resolve them?

 

How can you increase your TU?

To increase the throughput units (TUs) on your Azure Event Hubs namespace, you can either configure it on the Scale page or Overview page of your Event Hubs namespace in the Azure portal, or use the Auto-inflate feature.

 

Auto-inflate automatically scales up by increasing the number of TUs to meet usage needs.

Note that auto-inflate can only increase up to 20 TUs. To raise it to exactly 40 TUs, you need to submit a support request to us.

For more information visit aka.ms/auto-inflate.

 

How to distribute even load to all of your partitions?

You can revise the partition distribution strategy or try distribution by using EventHubClient.Send operation might do the trick.

 

IV. In conclusion

You may need to increase your TU or check if your loads are being distributed evenly. By doing so, you will be able to mitigate the throttling for 50002 error occurring on your EventHub. However, if you have any additional support, do not hesitate to contact us.

 

_____________________________________________________________________________________________________________________________

 

[50008 Error - Too many GetEntityRuntimeinfo]

Pre-requisite:

Are you getting 50008 Error from EventHub while using Databrick? Are you using EventHub Spark SDK? If you so, this is document might help you with resolving the issue.

 

I. What is GetEntityRuntimeinfo?

GetEntityRuntimeInfo is an operation that is used to retrieve information of the entity to read or send the message to the Databrick side by using Spark SDK. This operation is hard coded in the Azure Eventhub Spark SDK. [Line 109]

 

Unfortunately, the information cannot be cached because Spark driver/executor can change over time, and all the information is Round Robin Database (RRD - it stores data and displays the stored data over time.) based (in memory).

 

So, they are not being cached, and so driver will always call the runtime info calls per batching interval. The default interval is 500ms. Therefore, every time the operation needs to be called in order to get an event to the Databrick.

 

II. What is 50008 error and throttling request?

50008 Error is occurring when GetEntityRuntimeInfo is called more than 50 times per second which results in Throttling Request. Therefore, limiting this operation is crucial if you are getting such error messages.

Below is an example of the error message you can see from when this issue is occurring.

error1.png

 

III. What is the resolution or how to limit the request?

Make sure to use the trigger option is enabled in the Spark Client side in order to increase the intervals between the GetEntityRuntimeinfo being called. As mentioned earlier, the default is 500ms, therefore, calling this operation too often may cause a disturbance to your system. Also make sure your container’s, running code for your namespace, performance is fine since this issue can happen due to low CPU as the documentation states.

 

IV. In conclusion

By adding the trigger option can mitigate the situation, especially, if you are using numerous consumers and partitions in the EventHub. However, if the throttling still occurs, please contact us to resolve your issue.

Published on:

Learn more
Need help with this product?

We can help you with [EventHub] Types of Throttling Errors and how to mitigate it

If you want help implementing, troubleshooting, or improving this product, contact us and we’ll point you in the right direction.

Azure PaaS Blog articles
Azure PaaS Blog articles

Azure PaaS Blog articles

Share post:

Related posts

Azure Storage - TLS 1.0 and 1.1 retirement

Overview TLS 1.0 and 1.1 retirement on Azure Storage was previously announced for Nov 1st, 2024, and it was postponed recently to 1 year later...

1 year ago

Efficient Management of Append and Page Blobs Using Azure Storage Actions

  Overview In Azure Storage, Blob Lifecycle Management (BLM) allows you to automate the management of your data based on rules defined by...

1 year ago

[Azure AI Search] Internal Server Error when creating CMK encrypted objects

Scenario Customers follow the Microsoft doc to create CMK encrypted objects (data source, index etc.), but get the 500 Internal Serv...

1 year ago

Optimizing Azure Table Storage: Automated Data Cleanup using a PowerShell script with Azure Automate

Scenario This blog’s aim is to manage Table Storage data efficiently. Imagine you have a large Azure Table Storage that accumulates logs from ...

1 year ago

Optimizing Azure Table Storage: Automated Data Clean-up using a PowerShell script with Azure Automat

Scenario This blog’s aim is to manage Table Storage data efficiently. Imagine you have a large Azure Table Storage that accumulates logs from ...

1 year ago

Restoring Soft-Deleted Blobs with multithreading in Azure Storage Using C#

Blob soft delete is an essential feature that safeguards your data against accidental deletions or overwrites. By retaining deleted data for a...

1 year ago

Performing simple Azure Table Storage REST API operations using curl command.

The blog provides guidance to perform simple Table Storage REST API operations such as Create table, Delete Table, Insert entity, Delete entit...

2 years ago

Bulk delete all the old jobs from the batch account

Deleting a Job also deletes all Tasks that are part of that Job, and all Job statistics. This also overrides the retention period for Task dat...

2 years ago

Utilizing Azure Storage and Runbooks for scheduled automated backups of Azure SQL Databases

In this article, we are going to provide detailed steps to create a scheduled Azure SQL Database backup to storage account using automation. T...

2 years ago

[Azure Service Bus] JMS messages getting dead-lettered

The article discusses a problem where numerous messages end up in the dead letter queue (DLQ) when the JMS service bus consumer connects to th...

2 years ago

Newsletter

Get the latest Dynamics 365 and Power Platform content in your inbox

A curated digest of community blogs, product news, videos, and podcasts — delivered without the noise.

Weekly updates Unsubscribe anytime Fresh community picks
We use your email only for the newsletter and you can unsubscribe at any time.
By subscribing, you agree to the privacy policy.