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

GitHub API request rate seems wrong #156

Closed
joelekstrom opened this issue Oct 5, 2015 · 3 comments
Closed

GitHub API request rate seems wrong #156

joelekstrom opened this issue Oct 5, 2015 · 3 comments

Comments

@joelekstrom
Copy link
Contributor

skarmavbild 2015-10-05 kl 17 27 11

Looks a bit over the top to me.

@czechboy0
Copy link
Member

Yeah I've seen this before as well. I think the data is coming down incorrectly from GitHub, but it's also possible I have a bug in my calculations.

It's a couple of lines of code, please let me know if I'm doing something stupid :) https://github.com/czechboy0/Buildasaur/blob/master/BuildaGitServer/GitHubRateLimit.swift

But, when you look at it, it does make sense based on the data. Your example says it will renew in 3598 seconds, which means just 2 seconds elapsed, and the count is already at 185. So 185/2 = 92.5 requests per second (according to github) would really mean we're using a huge number of requests, even 12000% of what's allowed. At this pace, we'd be done in less than a minute :) That's why I think the rate limit headers from GitHub sometimes go bonkers (maybe when the reset hour just happened).

Again, any theories or fixes are welcome :)

@czechboy0
Copy link
Member

I tried more debugging and it's definitely GitHub sending incorrect header values. Closing since it's not a Buildasaur bug (and hopefully we won't even be affected by it, other than making these rate-limit estimates useless sometimes).

@joelekstrom
Copy link
Contributor Author

👍 thanks for investigating

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

No branches or pull requests

2 participants