Skip to content
Latchkey

actions/stale "GraphQL: secondary rate limit"

actions/stale makes many GraphQL/REST calls. Processing a large backlog quickly trips GitHub's secondary rate limit, which aborts the run with a 403.

What this error means

The stale step fails with "You have exceeded a secondary rate limit" during a large pass.

github-actions
GraphqlResponseError: You have exceeded a secondary rate limit. Please wait a few minutes before you try again.
##[error]You have exceeded a secondary rate limit

Common causes

Too many operations per run

A large backlog processed in one pass exceeds the secondary rate limit.

No per-run cap

operations-per-run is too high, so the action does not pace itself.

How to fix it

Cap operations per run

  1. Set operations-per-run to a smaller value so the pass stays under the limit.
  2. Schedule the workflow frequently so the backlog drains across runs.
  3. Re-run; the capped pass avoids the secondary limit.
.github/workflows/stale.yml
- uses: actions/stale@v9
  with:
    operations-per-run: 100
    days-before-stale: 60

How to prevent it

  • Tune operations-per-run for the repo backlog size.
  • Latchkey managed runners auto-retry transient infrastructure failures, but GitHub secondary rate limits are an API-side throttle: pace the action with operations-per-run rather than relying on retries.

Frequently asked questions

What causes ""You have exceeded a secondary rate limit""?
A large backlog processed in one pass exceeds the secondary rate limit.
How do I fix "You have exceeded a secondary rate limit"?
Cap operations per run

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card