GAE app timeouts updating Google oauth token

I have a GAE application that periodically requests user actions from G +. I am using google oauth client api for java .

This works fine for several months with literally changing the code (I will publish the code if necessary, all taken directly from the oauth client project examples using GoogleAuthorizationCodeFlow).

However, a couple of days ago this changed. Now, out of turn from the GAE instance, I get this exception when updating the token:

java.net.SocketTimeoutException: Timeout while fetching URL: https://accounts.google.com/o/oauth2/token at com.google.appengine.api.urlfetch.URLFetchServiceImpl.convertApplicationException(URLFetchServiceImpl.java:141) at com.google.appengine.api.urlfetch.URLFetchServiceImpl.fetch(URLFetchServiceImpl.java:43) at com.google.api.client.extensions.appengine.http.UrlFetchRequest.execute(UrlFetchRequest.java:77) at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1009) at com.google.api.client.auth.oauth2.TokenRequest.executeUnparsed(TokenRequest.java:299) at com.google.api.client.auth.oauth2.TokenRequest.execute(TokenRequest.java:323) at com.google.api.client.auth.oauth2.Credential.executeRefreshToken(Credential.java:586) at com.google.api.client.auth.oauth2.Credential.refreshToken(Credential.java:505) at com.google.api.client.auth.oauth2.Credential.intercept(Credential.java:266) 

Now it still works fine on my local machine. There are no quota issues reported on the GAE toolbar or the Google APIS console for this application. Billing is enabled for the Google API console project, but not for the GAE application.

I note that a similar problem in a python application is presented here , but so far there are no answers.

This happens continuously for several days - the application tries once an hour for hundreds or so different users. If I restrict the application to only doing this for a single user, it happens anyway.

+7
source share
4 answers

Here's what I noticed: the service started working for me for two days in a row at about 10:30 pm, and then again stopped working the next day at about 8 in the morning (both on Saturday and Sunday this weekend: June 8-9, 2013 of the year). Actually looks like a problem with a high load. Hope Google fix this soon.

I have not made any changes to my code on the application server. He just started working and then stopped working.

PS also looks like it takes about 40 seconds before the server gets a SocketTimeoutException every time I try to log in to Google plus.

PPS and yes, it works on my local instance of Google App Engine.

+2
source

We are still faced with the same problem: from about 1:00 a.m. to 9:00 p.m. GMT every day, the OAuth2 update token method starts to fail with a timeout error of 10-14 ours. After this time, he works again.

A similar issue is posted here: https://code.google.com/p/google-glass-api/issues/detail?id=99 .

Lorenzo

Update: it looks like the problem is resolved. See https://groups.google.com/forum/?fromgroups#!topic/google-appengine-downtime-notify/TqKVL9TNq2A

+1
source

I think maybe this is due to this problem:

Problem with the Google App Engine URL service service for Google Account authentication endpoints were resolved from 17:15 US / Pacific on June 7, 2013. We apologize for the inconvenience and thank you for your patience and continued support. Please be assured that system reliability is a top priority at Google, and we are making continuous improvements to improve our systems.

https://groups.google.com/forum/?fromgroups#!topic/google-appengine-downtime-notify/TqKVL9TNq2A

0
source

This timeout problem occurs sequentially for two instances of the application kernel running my application anyCloud and staging.anycloud.co). I can’t get an access token or update an existing one and match other posters, the same code works fine when working in localhost dev environment.

0
source

All Articles