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 limitCommon 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
- Set operations-per-run to a smaller value so the pass stays under the limit.
- Schedule the workflow frequently so the backlog drains across runs.
- 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: 60How 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
GitHub Actions actions/stale "API rate limit exceeded"Fix actions/stale "API rate limit exceeded" - the stale bot processed too many issues/PRs in one run and hit…
GitHub Actions github-script "secondary rate limit" / 403 Abuse DetectionFix actions/github-script hitting a secondary rate limit - too many rapid API writes trigger 403 abuse detect…
GitHub Actions "too many requests to the GitHub API" (rate limited in workflow)Fix GitHub Actions jobs that hit GitHub API rate limits mid-run - too many requests from gh, github-script, o…