How do I prevent "rate exceeded" ThrottlingException errors when I run monitoring scripts in Amazon EMR?

Last updated: 2020-10-07

To monitor my Amazon EMR clusters, I run scripts that make API calls. The scripts return errors like this:

"Rate exceeded (Service: AmazonElasticMapReduce; Status Code: 400; Error Code: ThrottlingException; Request ID: e2b6191c-gkl5-269r-u735-cryyz251a837)"

Short description

Amazon EMR throttles API calls to maintain system stability. Throttling exceptions usually occur when you run monitoring scripts at regular intervals to check clusters for a parameter. Here's an example: calling DescribeCluster every 60 seconds to check if the cluster has reached the WAITING state. The more clusters that you have and the more monitoring scripts that you run, the more likely you are to get throttling errors.

Resolution

To prevent throttling errors:

  • Reduce the frequency of the API calls.
  • Stagger the intervals of the API calls so that they don't all run at the same time.
  • Implement exponential backoff when making API calls.

Did this article help?


Do you need billing or technical support?