1

Intro

I merge resources-calendar, using syncToken and struggles with 403 rateLimitExceeded.

Background

Old application. It pairs and sync/merge calendars. Has done so for years.

Issue lies with a few old calendars. They have previously had other merge-apps and contain a lot of old large recurring-events. Much to sync.

Google recently released an update that disallows for double booking. I did some rewrites and it now requires a full chronological sync. I've been unable to go through some calendars due to rateLimitExceeded-errors. Most calendars/user-pairs are without issues.

Upon release, the error-rate where so severe that the creating user was unable to display any events in https://calendar.google.com. This means that the issue (quota) transcends one application.

Issue

403 Forbidden rateLimitExceeded despite being much below the increased API-quota.

I've come to understand that there's a hidden (quota) limit per user. I am limited to one user (doing creates/updates) for reliable tracking.

I've always had exponential backoff that terminates after a high number of retries. Last try has a 100 sec delay.

I've decreased the amount of parallelization a couple of times. I'm down to less than one request per second (1 req/s) but the error-rate remains constant!

Error-rate is 75% on updates. I'd guess that it's 100% from some calendars and less for the others.

The 403-error only seem to trigger from recurring events.

Further improvements include:

  • Using other users for get/list-requests
  • Keeping a database of events
  • quotaUser in requests

Question

Why does recurring events trigger rateLimitExceeded when below quota and executing at such a slow rate?

Niklas Ternvall
  • 510
  • 1
  • 3
  • 19
  • 1
    The default quota per user seems to be 500 requests/100s, according to what you've said you're much below the limit. Also I'm guessing that the 1m queries per day is not reached, right? According to the support [page](https://support.google.com/a/answer/2905486?hl=en), breaking some quotas may leave some calendars in read-only status. That could be one possible cause even though the displayed error is rateLimitExceeded. For further assistance, you can also create an issue in the [public issue tracker](https://issuetracker.google.com/issues/new?component=191627&template=824103). – bhito Sep 03 '19 at 10:29
  • " create more than 100,000 events in calendar during a short period " is definitely something I did, when provisioning the updated version while deprovisioning the old. – Niklas Ternvall Sep 03 '19 at 11:19
  • Then, according to what is in the documentation, I'm guessing that the calendars you are having issues must be in read-only status as the quota has been reached. Maybe the code retrying to use these calendars is involved in your 403 rateLimitExceeded error. – bhito Sep 03 '19 at 13:36

0 Answers0