Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: You have exceeded a secondary rate limit. Please wait a few minutes before you try again. #142

Open
SteveBox0 opened this issue Dec 19, 2022 · 10 comments

Comments

@SteveBox0
Copy link

As per Github docs it should retry after a period of time based off the HTTP response header "Retry-After: ".

https://docs.github.com/en/rest/guides/best-practices-for-integrators?apiVersion=2022-11-28#dealing-with-secondary-rate-limits

ℹ  info      Fetching issues with title "**************"
Error: You have exceeded a secondary rate limit. Please wait a few minutes before you try again.
✖  fatal     HttpError: You have exceeded a secondary rate limit. Please wait a few minutes before you try again. 
    at /tmp/github-runner-your-repo/_actions/JasonEtco/create-an-issue/v2/dist/index.js:5855:21
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async createAnIssue (/tmp/github-runner-your-repo/_actions/JasonEtco/create-an-issue/v2/dist/index.js:37606:32)
@SteveBox0
Copy link
Author

If you run a simple workflow that has an existing issue already created a few times this issue can be easily replicated.

@JasonEtco
Copy link
Owner

Thanks for reporting @SteveBox0. Can you be more specific? If you can give clear steps to reproduce it, that'd help a lot in my understanding, as I haven't seen it myself before.

@SteveBox0
Copy link
Author

@JasonEtco Apologies for the delay but needed to do some more testing to be 100% sure.

From the looks the issue occurs a lot more on self hosted github runners as you can have multiple runners requesting github API from the same IP. While github hosted runners each have a unique IP thus much lower chance of hitting the rate limit. For your own testing i would suggest running up a couple of github runners in docker containers (https://github.com/myoung34/docker-github-actions-runner). Then any simple github workflow with checking if an existing issue already exists should be enough. Run a couple of them around the same time, can be across different repos but with the same runner pool.

@OneCyrus
Copy link

we have the same issue in a scheduled workflow every time. it's using a ubuntu-latest runner. So it doesn't matter if selfhosted or not.

@saerosV
Copy link
Contributor

saerosV commented Mar 8, 2023

Happens to me as well, on GitHub-hosted runners.

@jgabuya
Copy link

jgabuya commented Mar 30, 2023

hey everyone, is there any workaround for this? having the same issue on a github-hosted runner

@saerosV
Copy link
Contributor

saerosV commented Mar 30, 2023

@jgabuya usually just waiting for a while and re-running the job or triggering a new one works for me.

@jeremycarroll
Copy link

A possible way to address this is to use a token from a github app. The rate limits for normal tokens are fairly low. I am unclear whether an app token gets higher secondary limits - the primary limits are a lot higher

@theofficialgman
Copy link

Also getting this about 1/5 of the time when using this action. The action runs once every 12 hours so there should not be any ratelimits hit

https://github.com/Botspot/pi-apps/actions/runs/8466989961/job/23197549473

mkly added a commit to mlcommons/modelgauge that referenced this issue Apr 8, 2024
* Avoid rate limit error on scheduled daily test

There appears to be an issue when scanning issues for a matching issue
title which triggers a secondary rate limit error. As this is not the
primary feature we are using and an optimization, removing this for now

See: https://github.com/mlcommons/newhelm/actions/runs/8604877224/job/23579923706
See: JasonEtco/create-an-issue#142
brianwgoldman pushed a commit to mlcommons/modelgauge that referenced this issue Apr 10, 2024
* Avoid rate limit error on scheduled daily test

There appears to be an issue when scanning issues for a matching issue
title which triggers a secondary rate limit error. As this is not the
primary feature we are using and an optimization, removing this for now

See: https://github.com/mlcommons/newhelm/actions/runs/8604877224/job/23579923706
See: JasonEtco/create-an-issue#142
mkly added a commit to mlcommons/modelgauge that referenced this issue Apr 12, 2024
* Avoid rate limit error on scheduled daily test

There appears to be an issue when scanning issues for a matching issue
title which triggers a secondary rate limit error. As this is not the
primary feature we are using and an optimization, removing this for now

See: https://github.com/mlcommons/newhelm/actions/runs/8604877224/job/23579923706
See: JasonEtco/create-an-issue#142
@rtrindvg
Copy link

Same error here. It seems to be triggered easily when using the "update_existing: true" parameter, so the search/issues endpoint is the one affected by the secondary rate limit.

Any updates on this issue?

fapdash added a commit to exercism/emacs-lisp that referenced this issue Sep 4, 2024
The job sometimes fails because we're hitting a rate limit.
Removing `update_existing: true` seems to the main culprit
for hitting the rate limit.

See JasonEtco/create-an-issue#142 (comment)

works on #359
BNAndras pushed a commit to exercism/emacs-lisp that referenced this issue Sep 4, 2024
The job sometimes fails because we're hitting a rate limit.
Removing `update_existing: true` seems to the main culprit
for hitting the rate limit.

See JasonEtco/create-an-issue#142 (comment)

works on #359
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants