问题
We are using Google Cloud instances (AppEngine) to synchronize data for our users with their Google Calendars (through the Calendar API). Basically, we provide a task management solution and the tasks should be synchronized (unidirectional) with the calendars they (the users) provide us access for.
How it all works: 1. We ask the users to grant access to their Google Account. 2. We ask them to select the desired calendar or offer the possibility of creating a new one under their account. 3. We push inserts/updates/deletes through the API.
The specific error we don't understand is 403 "Rate Limit Exceeded", which we received 190 times in the last 30 days from a total of 84,773 requests.
"error": {
"errors": [
{
"domain": "usageLimits",
"reason": "rateLimitExceeded",
"message": "Rate Limit Exceeded"
}
],
"code": 403,
"message": "Rate Limit Exceeded"
}
}
The reason we don't understand is because the maximum number of queries/day we have made is around 8K. The maximum daily limit we have in the Google Cloud API setting is 1 million.
Are there any other limits we need to be aware of? If not, what could be causing the issue? Did anyone face a similar scenario?
Thanks!
回答1:
The rate limit error is not the same as the daily usage limit error. The rate limit is a safety limit to ensure we are not bombarded with requests over a short period of time.
You can use exponential backoff retry algorithms to ensure rate limit doesn't stop your app dead in the water (instead it just slows it down).
来源:https://stackoverflow.com/questions/48868737/rate-limit-exceeded-google-calendar