在将文件更新到 Drive API 时,我的应用程序经常遇到此异常。
我首先认为它达到了用户请求的 60 秒限制,所以我将它移到了一个任务中(推送队列)。
现在,我仍然收到这个异常,所以我认为这是来自其他地方,但无法弄清楚在哪里。
谢谢你的帮助。
下面是完整的堆栈跟踪:
2013-05-07 15:55:20,241 ERROR An error occurred : Deadline exceeded while waiting for HTTP response from URL: https://www.googleapis.com/upload/drive/v2/files/0B_1TUNLdmniRNlFUY29sUEVSYjg?uploadType=resumable&alt=json&newRevision=true&upload_id=AEnB2UpiEAPY7XedKYn09yFCbN7FhVXhr0jXKvph9zLxdsenkM8muO7oX4VIECcgfAA3QDeUNUXXGVjOl1ScJy6elAn7TrATHw
Traceback (most recent call last):
File "/python27_runtime/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch
return method(*args, **kwargs)
File "/base/data/home/apps/s~unishared-gae/production.367146605343225296/main.py", line 720, in post
content, data['mimeType'], resumable=True)
File "lib/oauth2client/util.py", line 128, in positional_wrapper
return wrapped(*args, **kwargs)
File "lib/apiclient/http.py", line 657, in execute
_, body = self.next_chunk(http=http)
File "lib/oauth2client/util.py", line 128, in positional_wrapper
return wrapped(*args, **kwargs)
File "lib/apiclient/http.py", line 798, in next_chunk
headers=headers)
File "lib/oauth2client/util.py", line 128, in positional_wrapper
return wrapped(*args, **kwargs)
File "lib/oauth2client/client.py", line 490, in new_request
redirections, connection_type)
File "lib/httplib2/__init__.py", line 1570, in request
(response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)
File "lib/httplib2/__init__.py", line 1317, in _request
(response, content) = self._conn_request(conn, request_uri, method, body, headers)
File "lib/httplib2/__init__.py", line 1286, in _conn_request
response = conn.getresponse()
File "/python27_runtime/python27_dist/lib/python2.7/httplib.py", line 500, in getresponse
raise HTTPException(str(e))