Appengine python API调用mail.Send()花了太长时间才响应并被取消

时间:2012-02-20 11:43:01

标签: google-app-engine python-2.7

我们的appengine应用程序经常收到此错误。其他人是否收到此错误?有谁知道如何绕过它?

File "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/mail.py", line 894, in send
  make_sync_call('mail', self._API_CALL, message, response)
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 308, in MakeSyncCall
rpc.CheckSuccess()
File "/base/python27_runtime/python27_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 133, in CheckSuccess
raise self.exception
DeadlineExceededError: The API call mail.Send() took too long to respond and was cancelled.

由于

2 个答案:

答案 0 :(得分:1)

我收到了很多错误(在Python 2.5上),我决定将SendMail调用移动到任务中。这样我每次失败时至少会重试一次。

答案 1 :(得分:-1)

您必须通过2.5 + .5方法来创建更宽松的截止日期。

Take a look at this answer