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

Feature: Retry on rate limit #251

Open
1 of 2 tasks
koppor opened this issue Oct 24, 2024 · 5 comments · May be fixed by #261
Open
1 of 2 tasks

Feature: Retry on rate limit #251

koppor opened this issue Oct 24, 2024 · 5 comments · May be fixed by #261

Comments

@koppor
Copy link
Contributor

koppor commented Oct 24, 2024

Type of feature

💡 Feature

Current behavior

I sometimes get

You have exceeded a secondary rate limit. Please wait a few minutes before you try again. If you reach out to GitHub Support for help, please include the request ID AFC1:31FAC3:48D749:894FD1:671992DA.

Suggested solution

Please add a sleep and a retry in case of a rate limit warning.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Contributing Docs

  • I agree to follow this project's Contribution Docs
@koppor
Copy link
Contributor Author

koppor commented Oct 27, 2024

This refs https://stackoverflow.com/q/70030298/873282

making a request every 2s to stay within the primary rate limit of 30 reqs per minute (so not concurrently)

I am also validating every request with the GitHub rate limit API before I make the actual search API call.


when you trigger the secondary api rate limit you have to wait a time same as the one indicated in the Retry-After attribute of the response header.

@koppor koppor changed the title Feature: Retry on rate limlt Feature: Retry on rate limit Oct 27, 2024
@koppor
Copy link
Contributor Author

koppor commented Nov 3, 2024

This is kind of a blocker, because I get a "workflow failed" notification daily - example: https://github.com/JabRef/user-documentation/actions/runs/11648873086

@takanome-dev
Copy link
Owner

I'm so sorry @koppor 🙏 been busy lately. Will fix this ASAP

@koppor
Copy link
Contributor Author

koppor commented Nov 25, 2024

@takanome-dev Would be really nice if you could resume work on this nice project!

@takanome-dev
Copy link
Owner

Hi @koppor, apologies for the delay 😓

I'm currently working on a fix in PR #261. Need to write tests to simulate the rate-limiting error and ensure it’s handled properly.

Thank you for your patience.

@takanome-dev takanome-dev linked a pull request Dec 11, 2024 that will close this issue
16 tasks
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

Successfully merging a pull request may close this issue.

2 participants