i deploy an app using gcloud app deploy. It runs fine for couple of hours and then the jobs get stuck with following info log :

```
03:54:59.748 Refreshing due to a 401 (attempt 1/2)
03:58:44.816 Refreshing due to a 401 (attempt 1/2)
03:58:55.781 Refreshing due to a 401 (attempt 1/2)
03:58:56.317 Refreshing due to a 401 (attempt 1/2)

```

Seems like it is being logged from internal serviceName: "appengine.googleapis.com" 

The app deployed reads some file from GCS and publishes some computed metrics using google pubsub. I use google client api library which uses credentials to authenticate.

```
    credentials = GoogleCredentials.get_application_default()
    if credentials.create_scoped_required():
        credentials = credentials.create_scoped(['https://www.googleapis.com/auth/devstorage.read_only)
    http = httplib2.Http()
    credentials.authorize(http)
    return discovery.build('storage', 'v1', http=http)

```

Similar snippet for pubsub as well. Has any one run into similar issue where the request seems to be stuck forever with info logs showing 401 status code. Not sure why doesn't the request just times out and results in failure . any workarounds ?