API v3 503 Service Unavailable when inserting new calendar

553 views
Skip to first unread message

Mark

unread,
Feb 22, 2012, 4:18:37 AM2/22/12
to google-ca...@googlegroups.com
Hi,

Is there some known bug with new v3 Google Calendar API, I got randomly "503 Service Unavailable" backend error while trying to insert new calendar. I use google-api-services-calendar-v3-1.3.1-beta.jar if it matters.

This happens when user of my app wants to generate new Google calendar, I do then following steps:
1. Search if calendar with <app_title> exists
2. If yes - remove it
3. Create and insert new calendar with <app_title>
4. Add new events

Step 3 fails randomly with "503 Service Unavailable", if I repeat those 4 steps around 5 times, it is almost guaranteed at least once I get above mentioned error.

I've never had something like this with previous versions of Google Calendar API so I guess its v3 problem. Is there anything I can do about it ? Or the only way is to come back to v2 or v1 Google API ?

Regards,
Mark


Mark

unread,
Feb 22, 2012, 4:37:02 AM2/22/12
to google-ca...@googlegroups.com
What is even more bizarre, even though I get exception and error "503 Service Unavailable" when inserting new Calendar, calendar few times got inserted anyway ...

Lucia Siochi

unread,
Feb 27, 2012, 9:42:46 AM2/27/12
to google-ca...@googlegroups.com
I am experiencing a similar issue (503 Service Unavailable), but am using the .NET client instead.  I get the following:

Google.Apis.Requests.RequestError
Backend Error [503]
Errors [
    Message[Backend Error] Location[ - ] Reason[backendError] Domain[global]
]


Before this started happening, I was able to bulk create around 40 to 50 calendars.  This was a similar limitation we were experiencing with Calendar API v2, and we are testing out v3 since it is supposed to allow a higher daily quota. 

We are using 2legged authentication, if that makes a difference...


Nono

unread,
Feb 27, 2012, 7:16:00 PM2/27/12
to google-ca...@googlegroups.com
I am experiencing a similar issue (503 Service Unavailable), but am using the .NET client instead with the same error

and i cant solve this probleme, do you have find a reason ?

i hope this is not a limitation about number of calendars...

Nono

unread,
Feb 27, 2012, 7:18:36 PM2/27/12
to google-ca...@googlegroups.com
detail of error i receive is : 

You must provide a request body if you set ContentLength>0 or SendChunked==true. Do this by calling [Begin]GetRequestStream before [Begin]GetResponse. 

but body is correct and not null

Nono

unread,
Feb 29, 2012, 11:55:29 AM2/29/12
to google-ca...@googlegroups.com
do you find a solution for this problem ?

Lucia Siochi

unread,
Mar 1, 2012, 1:54:50 PM3/1/12
to google-ca...@googlegroups.com
This is the test code I am using, in case anyone sees what I might be doing wrong:

                OAuth2LeggedAuthenticator auth = new OAuth2LeggedAuthenticator(domainName, consumerSecret, usernameWithoutDomain, domainName);
                Google.Apis.Calendar.v3.CalendarService myService = new Google.Apis.Calendar.v3.CalendarService(auth);
                myService.Key = apiKey;
                CalendarList results = myService.CalendarList.List().Fetch();
                System.Console.WriteLine(results.Items.Count);

                    foreach (CalendarListEntry calendarListEntry in results.Items)  
                    {
                        Console.WriteLine(calendarListEntry.Summary);
                    }

                int i = 0;
                do
                {
                    System.Threading.Thread.Sleep(5000);
                    Calendar calendar = new Calendar();
                    calendar.Summary = "A" + i.ToString() +" Test Calendar ";
                    calendar.TimeZone = "America/Los_Angeles";
                    Calendar createdCalendar = myService.Calendars.Insert(calendar).Fetch();
                    Console.WriteLine(createdCalendar.Summary + ' ' + createdCalendar.Id);
                    i++;
                } while (i<10);

Nono

unread,
Mar 1, 2012, 4:49:51 PM3/1/12
to google-ca...@googlegroups.com
ok, i found the probleme, but cant explain...

my code is below, i just try to remove setting TimeZone and Location, and now i can create calendar as i want (my comment is in french like i am, sorry for my poor english)
note that i'm using a lot of calendar, more than 200 and i can continue to create so no restriction about number of calendar for now

i think i read that timezone and location was needed to create a calendar and i don't think about the probleme could come from this

hope it can help you too, tell me if it work for you, that will confirm the bug

in my code NomCalendrier just return string and description contain xml, that help me to store more information. In events i use ExtendedProperties to store extra data

I was very confused this this probleme cause i use V3 of api google in production, i just found the problem of creating calendar after migration and first it was a random problem

            //création du calendrier            
            Google.Apis.Calendar.v3.Data.Calendar calendar = new Google.Apis.Calendar.v3.Data.Calendar();
            
            calendar.Summary = NomCalendrier(email);
            //calendar.TimeZone = "Europe/Paris";
            calendar.Description = xml.OuterXml;
            //calendar.Location = "France";

            createdCalendar = service.Calendars.Insert(calendar).Fetch();            //création du calendrier            



Le mercredi 22 février 2012 10:18:37 UTC+1, Mark a écrit :

Le mercredi 22 février 2012 10:18:37 UTC+1, Mark a écrit :
Le mercredi 22 février 2012 10:18:37 UTC+1, Mark a écrit :
Le mercredi 22 février 2012 10:18:37 UTC+1, Mark a écrit :
Le mercredi 22 février 2012 10:18:37 UTC+1, Mark a écrit :
Le mercredi 22 février 2012 10:18:37 UTC+1, Mark a écrit :
Le mercredi 22 février 2012 10:18:37 UTC+1, Mark a écrit :
Reply all
Reply to author
Forward
0 new messages