Wreaking havoc with github api
See original GitHub issueI’ve been experiencing many odd issues with sites where I authenticate with Github lately. The root cause has been Github rate-limiting my api requests.
Looking into it with their help it seems to be Gitify is the culprit based on the user-agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) gitify/1.1.0 Chrome/52.0.2743.82 Electron/1.3.4 Safari/537.36 11,695 99.923%
Here’s an excerpt of their findings for an hour long window, the odd thing is I didn’t have Gitify running afaik:
You made a total of 11,704 GET requests, where a majority of them yielded a 403 status: Looking at your top path, you’re making a majority of your requests to the Notifications API:
https://developer.github.com/v3/activity/notifications/
A large majority of those calls made a request to this endpoint:
https://api.github.com/notifications?participating=false
The amount of requests made in this date-time range was double that of the rate limit (11,000+ versus 5,000). To illustrate how often this happened, as many as 3-5 requests were made every second. 5 requests per second for one minute would be 60 requests, and sometimes you made as many as 260 requests per minute. I am not sure if you’re trying to poll the API or why you’re doing that. Could you help me understand what you’re ultimately trying to achieve?
As an alternative to polling the endpoint without caching the existing data, I recommend checking out conditional requests:
https://developer.github.com/v3/#conditional-requests Making a conditional request and receiving a 304 response does not count against your Rate Limit, so we encourage you to use it whenever possible.
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top GitHub Comments
Quick update - The auto-updated still works, so once I get a change-log, some screenshots etc. I will release version 2.0.0 🎉
Hello everyone! I will soon (hopefully this week) release Gitify v2 which is a complete rewrite with GitHub Enterprise and many more things. Also it fixes this bug so give me a few days and this will be sorted!