Skip to content

AWS Athena MSK Connector - Glue ThrottlingException "Rate Exceeded"

0

Hi, We are using the AWS Athena MSK Connector to query Kafka messages via AWS Glue Schema Registry. However, I am encountering frequent throttling errors from AWS Glue when running queries in Athena.

GENERIC_USER_ERROR: Encountered an exception[software.amazon.awssdk.services.glue.model.ThrottlingException] from your LambdaFunction[arn:aws:lambda:us-east-1:512337096477:function:athena-msk-poc-lambda] executed in context[S3SpillLocation{bucket='athena-msk-spill-poc', key='athena-spill/7924e5cc-3df9-4e38-bcf8-911435bd7a48/f845be8e-70b5-4239-b735-10205dcb7970', directory=true}] with message[Rate exceeded (Service: Glue, Status Code: 400, Request ID: a0ada7ab-39f2-48b8-a823-439823ac9a0c)]

How can I prevent Athena MSK queries from hitting AWS Glue throttling limits? or Is there a way to increase Glue API limits for Athena MSK queries? Any guidance would be appreciated!

asked a year ago129 views
1 Answer
0

The throttling errors you're encountering with the AWS Athena MSK Connector are due to exceeding the rate limits for AWS Glue API calls. This is a common issue when running frequent or concurrent queries using Athena on MSK data.

To address this problem, you can try the following approaches:

  1. Reduce the frequency of your queries: If possible, space out your queries to avoid hitting the API rate limits.

  2. Implement retry logic: Add retry mechanisms in your application to handle these throttling exceptions. When you encounter a ThrottlingException, wait for a short period before retrying the query.

  3. Use predicate pushdown: As a best practice, utilize predicate pushdown in your Athena queries. This can help reduce the amount of data processed and potentially decrease the number of API calls to Glue. For example:

    SELECT * FROM "msk_catalog_name"."glue_schema_registry_name"."glue_schema_name" WHERE integercol = 2147483647

  4. Optimize your queries: Ensure your queries are as efficient as possible to minimize the load on Glue services.

  5. Consider using Athena's provisioned capacity: This feature can help manage workloads and share capacity more effectively, potentially reducing the likelihood of hitting API limits.

  6. Request a limit increase: If the above methods don't sufficiently address the issue, you may need to contact AWS support to request an increase in your Glue API rate limits.

Remember that these throttling limits are in place to ensure fair usage of shared resources. It's important to design your queries and overall system architecture with these limits in mind for optimal performance and reliability.
Sources
Resolve service limit or service quota errors in Athena | AWS re:Post
Troubleshoot issues in Athena - Amazon Athena
Amazon Athena MSK connector - Amazon Athena

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.