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

Implement retries #380

Open
jennybc opened this issue Oct 29, 2021 · 2 comments
Open

Implement retries #380

jennybc opened this issue Oct 29, 2021 · 2 comments

Comments

@jennybc
Copy link
Member

jennybc commented Oct 29, 2021

I've seen my first quota violation for Drive, via GHA. It looked like this:

── Error (test-drive_examples.R:5:3): drive_examples_remote() lists the remote example files ──
<gargle_error_request_failed/http_error_403/gargle_error/rlang_error/error/condition>
Error: Client error: (403) Forbidden
User Rate Limit Exceeded. Rate of requests for user exceed configured project quota. You may consider re-evaluating expected per-user traffic to the API and adjust project quota limits accordingly. You may monitor aggregate quota usage and adjust limits in the API Console: https://console.developers.google.com/apis/api/drive.googleapis.com/quotas?project=603366585132
* domain: usageLimits
* reason: userRateLimitExceeded
* message: User Rate Limit Exceeded. Rate of requests for user exceed configured project quota. You may consider re-evaluating expected per-user traffic to the API and adjust project quota limits accordingly. You may monitor aggregate quota usage and adjust limits in the API Console: https://console.developers.google.com/apis/api/drive.googleapis.com/quotas?project=603366585132
* extendedHelp: https://console.developers.google.com/apis/api/drive.googleapis.com/quotas?project=603366585132

https://developers.google.com/drive/api/v3/handle-errors

@jennybc
Copy link
Member Author

jennybc commented May 24, 2023

This was also ultimately a (very weird form of) quota violation, resulting in a 429 response:

r-lib/gargle#254

It did not look like the one above because it's coming from some opaque non-Drive-API-specific filter that has to do with seeing too much traffic from some range of IP addresses. But if we switch to gargle::request_retry() in googledrive, as we already do in googlesheets4, it should fix or at least make things much better.

jennybc added a commit that referenced this issue Jun 8, 2023
Relates to #380.

This is only "relates" and not "closes" because #380 shows that many retry-able errors with Drive will be a 403 (with specific `reasons`), which are not among the retry-able code currently built-in to `gargle::request_retry()`.

But at least we'll retry for 429 now.
@jennybc
Copy link
Member Author

jennybc commented Jun 8, 2023

To handle the 403 captured above, gargle::request_retry() needs to gain more functionality. But at least we retry on 429 now.

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

No branches or pull requests

1 participant