How do I resolve the TooManyRequestsException error in Amazon Athena?

2 minute read
0

I want to resolve the TooManyRequestsException error in Amazon Athena.

Short description

To manage queries, Athena allocates resources based on the overall service load and incoming request volume. Before they run, queries go through a temporary queuing process. Asynchronous processes retrieve queries from the queues and run them on available physical resources. These processes follow your account configuration quotas. Your DML or DDL query quota includes running queries and queued queries. If the sum of running and queued queries exceeds your DML or DDL query quota, then a TooManyRequestsException error appears.

Resolution

Note: When you increase the DML or DDL active queries, the number of queries that run doesn't change. When Athena is waiting for compute resources to become available, more queries are placed in the queued state.

To resolve the TooManyRequestsException error, take the following actions:

  • Use the Athena Service Quotas console to request a quota increase. To identify the quota that's exceeded, review the AWS CloudTrail logs for either DML or DDL failures. For more information, see Service Quotas.
  • Reduce the number of requests, or distribute the requests over a specific time period.
  • Use an ExponentialBackoff algorithm to implement longer wait times between query retries or when you simultaneously run multiple queries. For more information, see Retry behavior.
  • Implement performance tuning tips to improve your query performance in Athena.
  • To make sure that your queries run, use capacity reservations. For more information on capacity reservation pricing, see Amazon Athena pricing.
AWS OFFICIAL
AWS OFFICIALUpdated a month ago