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

How to handle rate limiting from GitHub? #4

Closed
iandouglas opened this issue Nov 22, 2018 · 6 comments
Closed

How to handle rate limiting from GitHub? #4

iandouglas opened this issue Nov 22, 2018 · 6 comments
Labels
enhancement New feature or request

Comments

@iandouglas
Copy link
Contributor

Turns out that 75+ user stories with lots of interdependencies and labels triggers a rate limit on the GitHub API.

Any thoughts on how best to throttle this? Got any contacts at GitHub to find out what this rate limit actually is so I can calculate how best to circumvent this especially if I have a bunch of students trying to run this all at the same time? :)

@iandouglas
Copy link
Contributor Author

Even with a full second pause between creating each story I'm only able to import about 37 stories before GitHub shuts me down. :)

@iandouglas iandouglas added the enhancement New feature or request label Nov 22, 2018
@iandouglas
Copy link
Contributor Author

iandouglas commented Nov 23, 2018

5 seconds between each new story seems to be more than enough, and 1.5 seconds between edits for dependencies and such seems to work okay for my 70-ish user stories with lots of dependencies and child/parent relationships. (total time was about 15 minutes)

It'd be nice, though, if the code could see that it's being rate-limited, pause for a while and retry the request on its own (with exponential backoff) instead of shutting down completely. Not sure this is something that comes back in GitHub's headers or not, or how we'd even intercept that.

@adamzolyak
Copy link
Contributor

@iandouglas you should be able to interactively check on rate limits. Seems like GitHub Apps are governed by the same rate limits with the potential to earn an increased rate limit for larger organizational users. I'll also ask my team to see if anyone knows about other rate limiting.

Please share if you learn more.

@adamzolyak
Copy link
Contributor

@iandouglas
Copy link
Contributor Author

I like it. I just couldn't find any docs from Probot to look at headers. I posted an issue for them a while back as well at probot/probot#779 but haven't had any response yet.

@adamzolyak
Copy link
Contributor

Created #9 as a proposed improvement. Sorry for moving things around. This card seemed like a spike (answer some questions and learn about options), so suggest closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants