Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Calendar API: Calendar usage limits exceeded

We have an application that does migrations between Google Apps domains. For calendar migrations we using Import API(https://developers.google.com/google-apps/calendar/v3/reference/events/import). For last six months we did a lot of calendar migrations. But about week ago we faced with new API error for import:

    "error"=>
  {"errors"=>[
    {"domain"=>"usageLimits",
    "reason"=>"quotaExceeded",
    "message"=>"Calendar usage limits exceeded."}], 
  "code"=>403, 
  "message"=>"Calendar usage limits exceeded."

Last week we got a lot of "Calendar usage limits exceeded." errors for users from different domains. Accordingly to Google API Console we didn't reach daily quota limit. For our app we using 2legged authorization.

Please help us understand what does "Calendar usage limits exceeded." mean? How we can prevent this error? Where we can find information about Calendar usage limits?

like image 551
Abliamit Avatar asked Mar 18 '13 09:03

Abliamit


1 Answers

Having the same issue.

I am using Version 3 code, TwoLeggedOAuthCredentials and the program is an authorized registered client (IOW: the calendars are created on behalf of multiple accounts.)

Last successful large imports: 2013-01-21, 4929 Google requests & 2013-01-22, 1103 Google requests (spread across multiple users)

At about 4% of our quota (https://code.google.com/apis/console/b/0/#project:1077083635926:quotas) the program starts getting the following error: https://www.googleapis.com/calendar/v3/calendars?alt=json returned "Calendar usage limits exceeded.">

If the program is re-run after a time (15 minutes +) it will run a couple more requests before receiving the same error. The calendar information it errored on previously will succeed if re-run after a "cool-off" period. The code itself sleeps for the number of times it receives that error multiplied by 20 seconds and tries ten times (waits 20 seconds after the first error, forty seconds after the second error) but it has increased the time to run the program greatly.

I increased the per user limit from 5 requests/second/user to 10.0 requests/second/user yesterday. So far this has had no noticeable change in behavior. Stepping through the code slowly also doesn't seem to have impact, leading me to believe it is unrelated to the requests per second.

If this is an undocumented per-user quota (and not their well documented request/second/user quota) it is new.

like image 160
user2201014 Avatar answered Oct 27 '22 13:10

user2201014