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?