0pdd icon indicating copy to clipboard operation
0pdd copied to clipboard

API rate limit exceeded

Open g4s8 opened this issue 6 years ago • 15 comments

0pdd returns an error for a webhook:

403 - API rate limit exceeded for user ID 24456188. // See: https://developer.github.com/v3/#rate-limiting
	/app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/response/raise_error.rb:16:in `on_complete'
	/app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/response.rb:9:in `block in call'
	/app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/response.rb:61:in `on_complete'
	/app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/response.rb:8:in `call'
	/app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
	/app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
	/app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/rack_builder.rb:143:in `build_response'
	/app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/connection.rb:387:in `run_request'
	/app/vendor/bundle/ruby/2.3.0/gems/faraday-0.15.1/lib/faraday/connection.rb:138:in `get'
	/app/vendor/bundle/ruby/2.3.0/gems/sawyer-0.8.1/lib/sawyer/agent.rb:94:in `call'
	/app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/connection.rb:156:in `request'
	/app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/connection.rb:19:in `get'
	/app/vendor/bundle/ruby/2.3.0/gems/octokit-4.9.0/lib/octokit/client/repositories.rb:29:in `repository'
	/app/0pdd.rb:400:in `repo'
	/app/0pdd.rb:295:in `block in <top (required)>'

g4s8 avatar May 26 '18 15:05 g4s8

@yegor256/z please, pay attention to this issue

0crat avatar May 26 '18 15:05 0crat

@g4s8/z this project will fix the problem faster if you donate a few dollars to it; just click here and pay via Stripe, it's very fast, convenient and appreciated; thanks a lot!

0crat avatar May 26 '18 15:05 0crat

Job #212 is now in scope, role is DEV

0crat avatar May 30 '18 11:05 0crat

Bug was reported, see §29: +15 point(s) just awarded to @g4s8/z

0crat avatar May 30 '18 11:05 0crat

The job #212 assigned to @robsonataide/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be a monetary reward for this job

0crat avatar Jun 24 '18 08:06 0crat

The job #212 assigned to @fybwid/z, here is why; the budget is 30 minutes, see §4; please, read §8 and §9; if the task is not clear, read this and this; there will be a monetary reward for this job

0crat avatar Jun 29 '18 06:06 0crat

@0crat wait @yegor256 I need more details with this issue

yosefbennywidyo avatar Jun 29 '18 06:06 yosefbennywidyo

@0crat wait @yegor256 I need more details with this issue (here)

@fybwid The impediment for #212 was registered successfully by @fybwid/z

0crat avatar Jun 29 '18 06:06 0crat

The current API limit rate is 5000 request per hour noted here. @yegor256, is Conditional Requests possible to do?

yosefbennywidyo avatar Jul 01 '18 16:07 yosefbennywidyo

@fybwid yes, we can do conditional requests, why not?

yegor256 avatar Jul 01 '18 19:07 yegor256

@g4s8 The current API limit rate is 5000 request per hour noted here and your log also display it at first line.

My opinion, is not the 0pdd who can't get the webhook but it's because the current user is over the allowed quota.

yosefbennywidyo avatar Jul 03 '18 10:07 yosefbennywidyo

@fybwid but this log was posted as a comment by 0pdd user, so current user is 0pdd in this log. And I don't think it's a webhook quota, but API quota - 0pdd uses Github API to post comments and close tickets.

g4s8 avatar Jul 06 '18 13:07 g4s8

@g4s8 yes, I'm agree that it wasn't the webhook quota but API quota. It's the same as what I said before, and for more details, on your first line log 403 - API rate limit exceeded for user ID 24456188. // See: https://developer.github.com/v3/#rate-limiting, is this user ID 24456188 belong to 0pdd? Also in my opinion, the webhook process is happened but because it's exceed the API limit rate then we got 403.

yosefbennywidyo avatar Jul 06 '18 13:07 yosefbennywidyo

@fybwid yes, it's 0pdd user, see https://api.github.com/user/24456188

g4s8 avatar Jul 06 '18 14:07 g4s8

I've find sample here: https://github.com/rails/rails/blob/master/actionpack/lib/action_controller/metal/conditional_get.rb

and here: https://www.rubydoc.info/gems/sinatra/Sinatra%2FHelpers:etag

Still, I need more enlightenment with applying the conditional requests.

yosefbennywidyo avatar Nov 05 '19 10:11 yosefbennywidyo