ezyang / ghstack

Submit stacked diffs to GitHub on the command line

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hitting github rate limits

hsghori opened this issue · comments

Recently I've been unable to use ghstack effectively because I keep hitting github rate limits.

I ran ghstack a couple times this morning and eventually ran into:

RuntimeError: {
 "message": "API rate limit exceeded for user ID xxx.",
 "documentation_url": "https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting"
}

So I used the rate limit API to check when it would reset and then tried again and ran into the same issue after a single ghstack.

I haven't looked into the source code but it does seem like this tool is hitting the API a lot and maybe there's some optimization that could be done to either limit the number of API queries or change the authentication strategy to increase the rate limit

The limit is 5000 requests per hour, so even if ghstack makes 10x more requests it is supposed to, it still seems hard to imagine you'd be hitting it. How many times per hour are you running ghstack, and how large are your stacks?

Going to close this issue. I assumed it was an issue with ghstack but it looks like there was some other app calling the github API that I didn't expect.