## TL;DR

The agent fires many Athena queries at once and hits the account's concurrent query limit, so queries queue or fail and the dashboard goes stale. Serialize the cost queries (run them sequentially), combine them where possible, and cache results between pulls. Athena's concurrency limit is per account; the agent must stay under it.

## Error

```text
agent's hourly cost pull hit the 10 concurrent query limit on Athena  -  the dashboard went stale
```

## Steps

1. Confirm the throttle: Athena shows queued or rejected queries during the pull window. Expected: the concurrency limit is the bottleneck.
2. Change the agent to run cost queries sequentially instead of in parallel. Expected: at most one or two queries run at once.
3. Combine multiple small queries into fewer, larger ones where the logic allows. Expected: the query count drops.
4. Cache the results and serve the dashboard from cache; only re-query on schedule. Expected: the dashboard stays fresh without repeated bursts.
5. Re-run the pull cycle and verify all queries complete. Expected: no throttling, current data.

## When to use

- Athena cost queries hit the concurrent query limit.
- Parallel query bursts throttle.
- The dashboard goes stale after throttles.

## When not to use

- Queries fail on syntax (a query bug).
- The limit is on data scanned (a query-efficiency problem).
- One slow query blocks the rest (optimize that query).

## Tool compatibility

AWS Athena (current 2026 releases).

### Variant phrasings

### "too many concurrent queries" on athena

Serialize the queries.

### parallel cost queries throttled

Run sequentially and cache.

### athena burst during the hourly pull

Fewer, bigger queries plus caching.

## Why it happens

Athena's concurrent query quota is shared across the account, and an agent that parallelizes aggressively consumes it in one burst, starving its own queries and anyone else's. Cost data changes slowly, so the burst buys nothing: sequential queries with caching deliver the same freshness without the throttle. Concurrency is a resource to budget, not a speed lever to max out.

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_NU_D5F2f0IApAn2BcxYG9w
