Skip to content
Latchkey

GitHub Actions actions/stale "API rate limit exceeded"

actions/stale paginates through issues and pull requests and makes an API call per action it takes. On a large backlog it can exhaust the hourly REST API limit for the token in a single run.

What this error means

A stale workflow fails partway through with "API rate limit exceeded", leaving some issues unprocessed.

github-actions
Error: API rate limit exceeded for installation ID xxxxx.
##[error]You have exceeded a secondary rate limit.

Common causes

Too many operations per run

A large backlog plus a high operations-per-run consumes the API budget quickly.

Secondary rate limits

Rapid write operations can trip secondary abuse limits even below the primary cap.

How to fix it

Throttle the stale run

  1. Lower operations-per-run to spread work across scheduled runs.
  2. Run the workflow more frequently with smaller batches.
  3. Narrow the scope with labels or only-issues/only-PRs.
.github/workflows/stale.yml
- uses: actions/stale@v9
  with:
    operations-per-run: 30
    days-before-stale: 60

How to prevent it

  • Tune operations-per-run to your backlog size.
  • Schedule frequent small runs instead of one large sweep.

Frequently asked questions

What causes ""actions/stale: API rate limit exceeded""?
A large backlog plus a high operations-per-run consumes the API budget quickly.
How do I fix "actions/stale: API rate limit exceeded"?
Throttle the stale 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