GitHub Actions "You have exceeded a secondary rate limit"
Secondary (abuse) rate limits trip on burst patterns - too many requests in a short window, too many concurrent requests, or too many writes to the same resource - independent of the hourly primary quota.
What this error means
A step calling the GitHub API (gh, github-script, or curl) fails with a 403 secondary rate limit message.
RequestError [HttpError]: You have exceeded a secondary rate limit.
Please wait a few minutes before you try again.
status: 403Common causes
Bursty or concurrent API calls
Tight loops, paginated fetches without delay, or many matrix jobs hitting the API at once trigger the abuse detector.
Repeated writes to one resource
Rapid comment/label/dispatch writes on the same issue or repo are throttled harder than reads.
How to fix it
Back off and retry
- Honor the Retry-After header when present; otherwise wait at least 60 seconds before retrying.
- Serialize matrix API calls or add a small delay between requests.
- Use github-script with octokit throttling plugin behavior rather than a tight curl loop.
- uses: actions/github-script@v7
with:
retries: 3
script: |
// octokit auto-backs-off on secondary limits with retries setHow to prevent it
- Avoid concurrent writes to the same resource across matrix legs.
- Cache API results instead of re-fetching the same data per job.