DavidDeSimone / OpenCloudSaves

A tool used for syncing your save games across your devices
MIT License
331 stars 8 forks source link

Getting RATE_LIMIT_EXCEEDED when using google drive #85

Open tioalexis opened 1 year ago

tioalexis commented 1 year ago

Describe the bug Syncing will take an incredibly long time and when it finishes, the logs will report a RATE_LIMIT_EXCEEDED error.

To Reproduce Steps to reproduce the behavior:

  1. Add Google Drive as the cloud service.
  2. Sync any game that you know has contents.
  3. Trigger a dry run and it should report just fine.
  4. Proceed with sync and it will take a long time.
  5. After the sync completes, read the logs.

Expected behavior Syncing should immediately cancel and report the issue to the user. Or report the issue to the userand give them the option to cancel while it retries in the background.

Screenshots

low level retry 1/10 (error googleapi: Error 403: Quota exceeded for quota metric 'Queries' and limit 'Queries per minute' of service 'drive.googleapis.com' for consumer 'project_number:202264815644'.
Details:
[
{
"@type": "type.googleapis.com/google.rpc.ErrorInfo",
"domain": "googleapis.com",
"metadata": {
"consumer": "projects/202264815644",
"quota_limit": "defaultPerMinutePerProject",
"quota_limit_value": "420000",
"quota_location": "global",
"quota_metric": "drive.googleapis.com/default",
"service": "drive.googleapis.com"
},
"reason": "RATE_LIMIT_EXCEEDED"
},
{
"@type": "type.googleapis.com/google.rpc.Help",
"links": [
{
"description": "Request a higher quota limit.",
"url": "https://cloud.google.com/docs/quota#requesting_higher_quota"
}
]
}
]
, rateLimitExceeded)

Rate limited, increasing sleep to 2.939074062s

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

DavidDeSimone commented 1 year ago

Thanks for the report - it seems that Google Drive is more aggressive about rate limiting than the other providers. I'll work on better surfacing this information to the use and allow them to retry if rate-limited.