How do I resolve service quota errors in Athena?

3 minute read
0

I want to resolve service quota errors in Amazon Athena.

Short description

If your queries fail in Athena because of service quota errors, then you might receive one of the following error responses:

  • TooManyRequestsException
  • ThrottlingException
  • Query Timeout
  • QueryString failure

To check the default values of Athena endpoints and quotas for different AWS Regions, see Service quotas.

Resolution

Note: Before you begin, check your current Athena quotas.

TooManyRequestsException

A DML or DDL query quota contains running and queued queries. If you submit more queries than the specified limit for your DML or DDL query, then a TooManyRequestsException error response appears. Common DDL queries in Athena include ALTER TABLE ADD PARTITION, CREATE TABLE, and DROP. Common DML queries in Athena include SELECT, CREATE TABLE AS (CTAS), and INSERT INTO.

To check the current queue, use one of the following methods:

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.

  • Open the Athena console, and then navigate to the recent queries tab to view all active queries.
  • Run the list-query-executions AWS CLI command to view all available query IDs.

Note: When you increase the query concurrency, you can submit more queries but you don't have more resources for the queries. Queries remain in a queued state until resources are available in Athena to run the queries.

To resolve this error, use Athena's provisioned capacity to increase query concurrency, manage workloads that access the capacity, and share capacity among workloads. For more information, see Managing query processing capacity. For more information about capacity reservation pricing, see Amazon Athena pricing.

For further troubleshooting, see How do I resolve the TooManyRequestsException error in Amazon Athena?

ThrottlingException

Athena has per AWS account API call quotas. If you exceed your API quotas, then you receive an error message that's similar to the following one:

"ClientError: An error occurred (ThrottlingException) when calling the <API_name> operation: Rate exceeded."

To resolve this error, reduce the frequency of the API calls and use the retry logic. For more information, see the Retry logic section of Managing and monitoring API throttling in your workloads.

Query Timeout

A timeout occurs when a query exceeds the predefined time limit. For DML queries, the predefined time limit is 30 minutes. To resolve this error, see How can I resolve "Query Timeout" errors in Athena?

QueryString failure

The maximum query string length in Athena is 262,144 bytes (B), and you can't adjust the quota. To prevent a query string failure, split long queries into smaller queries. For more information, see How can I increase the maximum query string length in Amazon Athena?

AWS OFFICIAL
AWS OFFICIALUpdated 7 months ago
No comments