auhuman
auhuman

Reputation: 972

Athena API get current number of Queries running concurrently

I have failures in my system due to Athena Limit. Athena has a limit of running only 5 concurrent queries.

My solution is, I want my system to check the current number of queries running concurrently in Athena and if it is less than 5 then I want to execute my query else wait for some time and check again.

Is there an Athena API which returns current number of queries running concurrently in Athena

Note I can increase the limit with a request which I want to keep as my last option plus it is not scalable solution

Upvotes: 2

Views: 3982

Answers (2)

Abhijeet Gaikwad
Abhijeet Gaikwad

Reputation: 41

You can also retry on throttling exceptions. Using Exponential backoff with jitter gives a good chance of queries succeeding in subsequent efforts.

See related AWS blog.

Upvotes: 0

jens walter
jens walter

Reputation: 14039

The only way to achieve this is through multiple AWS API calls.

First, you have to call the aws athena list-query-executions method to get all recent execution IDs.

Afterwards you can query the status of those IDs through the following call:

aws athena batch-get-query-execution --query-execution-ids {ids}

Upvotes: 3

Related Questions