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
- Lower operations-per-run to spread work across scheduled runs.
- Run the workflow more frequently with smaller batches.
- 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: 60How to prevent it
- Tune operations-per-run to your backlog size.
- Schedule frequent small runs instead of one large sweep.
Related guides
actions/stale: Auto-Close Stale Issues & PRsReference for actions/stale: label and close inactive issues and pull requests on a schedule, with day thresh…
GitHub Actions actions/github-script "require is not defined" (ESM)Fix actions/github-script "ReferenceError: require is not defined" - ESM-style imports or top-level await wer…
GitHub Actions slackapi/slack-github-action "invalid_auth"Fix slackapi/slack-github-action "invalid_auth" - the bot token is missing, malformed, or lacks the scope for…