heronyang / cloud-switch

Transfer your files between different cloud storage services.
2 stars 0 forks source link

Google Drive User Rate Limit Exceeded #2

Closed inteltao closed 7 years ago

inteltao commented 7 years ago

I am using Google Drive Rest API V3. When I try to query the files, I will have 403 forbidden error due to the following, so I have to pause for hundreds of milliseconds after each query.

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "userRateLimitExceeded",
    "message": "User Rate Limit Exceeded"
   }
  ],
  "code": 403,
  "message": "User Rate Limit Exceeded"
 }
}

The reason is unknown since the Quota for the drive API should be very big (1000 queries /100 second)

heronyang commented 7 years ago

If you check out the error page provided by Google, you can see there's another limitation: "The maximum rate limit is 10 qps per IP address."

It seems like a similar limitation you listed, 1000 q / 100 sec. We should decrease the amount of requests, and add some delays between requests.