API Rate Limit Triggered


#1

Hello,
Our Github App (InstallationId: 65092) appears to have erroneously? hit the rate limit when adding an Assignee to an Issue.
Our logs show a sudden drop from 2635 to 0 tokens when assigning an issue. This occurred between [11/15/2017 4:34:27.731 PM GMT] - [11/15/2017 4:55:02.730 PM GMT]

Can you please take a look?

{“level”:“info”,“ts”:1510763667.7318907, “msg”:“RateLimits()”,“Limit”:6250,“Remaining”:2635}
{“level”:“info”,“ts”:1510763668.5655236, “msg”:"Assign Open Issue() - Complete "}
{“level”:“info”,“ts”:1510764902.7302945, “msg”:“RateLimits()”,“Limit”:6250,“Remaining”:0}

https://developer.github.com/v3/issues/assignees/#add-assignees-to-an-issue

Regards,
Mike


#2

Hi @taylormike :wave:

That indeed sounds strange. As far as I can tell from our logs – there was no erroneous decrease in your quota like the one you described. From what you wrote, it seems like you’re saying that you didn’t make any requests in the specified time period, so it’s unexpected that the remaining quota dropped to 0, is that right?

Our logs show a sudden drop from 2635 to 0 tokens when assigning an issue. This occurred between [11/15/2017 4:34:27.731 PM GMT] - [11/15/2017 4:55:02.730 PM GMT]

If that’s what you’re saying, then our logs indicate otherwise – they indicate that the installation with that ID made lots of requests in that period, so your remaining quota continued to decrease as you made those requests. And after making enough requests – the quota decreased to 0, which is expected.

Is it possible that you have some problem in your logging which is causing you to think that you didn’t make any requests when you actually did? For example, I noticed in our logs that within a period of 1 hour, that installation made more than 1500 requests to https://api.github.com/repositories/49970642, which seems like a lot and also a bit wasteful. Perhaps you’re not tracking these requests correctly?


#3

Hi @izuzak

Thank you for taking a look at this. Yes, that is correct. It’s unexpected that the remaining quota dropped to 0.
On a separate thread our App performs GET requests and 1500 GET requests are expected during peak workloads. However, I wouldn’t expect this on 11/15. Did this occur on 11/15?
Thank you for your time. We are looking into this right now on our end.
Regards,
Mike


#4

It’s unexpected that the remaining quota dropped to 0.

Thanks for confirming, @taylormike. :bow: Yeah, looking at our logs – that’s not what happened. The quota didn’t drop like that – it was consumed by your installation.

However, I wouldn’t expect this on 11/15. Did this occur on 11/15?

Yes. It happened during a 1-hour period within 11/15. During the whole day 11/15, you fetched that resource more than 35000 times according to our logs. Sometimes you fetch it over 3000 times during a 1-hour period.

1500 requests is expected during peak workloads.

Just to make I sure I understand how you’re using the API – why is that expected? Why are you making so many requests to the same endpoint over and over again? To me, that seems a bit wasteful, but I’d love to read more from you about this.