1

When I use the Google calendar API to create a new Calendar, I randomly get "Backend Error". Do you have any idea why ? Have you experienced the same behavior ?

First request :

POST https://www.googleapis.com/calendar/v3/calendars Authorization: Bearer ya29.UQEd-xxx Content-Type: application/json; charset=utf-8

{"summary":"My new calendar name"}

Google answer (around 20 seconds later):

{ "error": { "errors": [ { "domain": "global", "reason": "backendError", "message": "Backend Error" } ] "code": 503, "message": "Backend Error" } }

The calendar is not created

Another request :

POST https://www.googleapis.com/calendar/v3/calendars Authorization: Bearer ya29.UQEd-yyy Content-Type: application/json; charset=utf-8

{"summary":"My new calendar name"}

Google answer (around 5 seconds later) : 200 The calendar is created

Tom
  • 4,666
  • 2
  • 29
  • 48
  • When you are trying to create a calendar using calendar API, first time you got 503 and later it was succeed? Are you trying to create calendar for the same project in both the requests? – SGC Apr 10 '15 at 18:53
  • It succeed **sometimes** : sometimes at the first request, sometimes after few try in the same project. – Tom Apr 11 '15 at 19:46

3 Answers3

6

503 Service Unavailable
The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.

503 is a standard HTTP error that happens sometimes. Google ops probably has a graph somewhere showing the frequency of the errors and depending on their priorities may be working to fix it. You should catch the error and either give a human the chance to retry or implement exponential backoff.

Google Apps Calendar Resource API Limits and Quotas
For all errors that are time based (maximum of N things for N seconds per thread), especially the 503 status code errors, we recommend your code catch the exception and, using an exponential backoff algorithm, wait for a small delay before retrying the failed call.

abraham
  • 46,583
  • 10
  • 100
  • 152
  • Thank you for this answer. It doesn't seems to be Quota related (and if it was, Google should give an hint about it in the response...). When the error occurs, the human takes the decision for the next step. (the back-end don't even have a chance to retry, 20 seconds is already a long time to give a feedback) – Tom Apr 11 '15 at 19:53
  • I never said it was quota related, that's just the page that Google references exponential backoff from. – abraham Apr 11 '15 at 20:49
1

For people visiting this in the future, I think that a 503 error can also be thrown when there are an insane number of events and Google Calendar simply chokes on them. I had a event that somehow got duplicated 18k times on a single day and event trying to use events.list with a maxResults of 1 resulted in a 503 error.

derekantrican
  • 1,891
  • 3
  • 27
  • 57
0

https://twitter.com/googlecalendar/with_replies Yes google calendar services are currently unavailable. Confirmed from twitter.

5eri4l
  • 39
  • 4
  • 2
    Thank you, but my question was 4 years ago ;) – Tom Jun 18 '19 at 16:14
  • 1
    Though SO is generally NOT the place for me to go for current outage news, this was where I landed from my search and this news was, remarkably, exactly what I needed to know--thanks! – John Larson Jun 18 '19 at 17:36