0

在写入响应时,我遇到了随机的 DeadlineExceededError 异常。这是我的处理程序:

class MyHandler(webapp2.RequestHandler):
    def get(self):
         result = [{'id':1},{'id':2}]
         json_result = json.encode(result)
         self.response.write(json_result)

日志说:

Traceback (most recent call last):
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 266, in Handle
    result = handler(dict(self._environ), self._StartResponse)
  File "/base/data/home/apps/s~ynhac-net/1.370047219851726476/engineauth/middleware.py", line 154, in __call__
    resp = req.get_response(self.app)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webob-1.1.1/webob/request.py", line 1086, in get_response
    application, catch_exc_info=False)
  File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webob-1.1.1/webob/request.py", line 1058, in call_application
    output.extend(app_iter)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/appstats/recording.py", line 1286, in appstats_wsgi_wrapper
    end_recording(status)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/appstats/recording.py", line 1410, in end_recording
    rec.save()
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/appstats/recording.py", line 654, in save
    key, len_part, len_full = self._save()
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/ext/appstats/recording.py", line 678, in _save
    namespace=config.KEY_NAMESPACE)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py", line 1008, in set_multi
    namespace=namespace)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py", line 907, in _set_multi_with_policy
    status_dict = rpc.get_result()
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 612, in get_result
    return self.__get_result_hook(self)
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/memcache/__init__.py", line 974, in __set_with_policy_hook
    rpc.check_success()
  File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 583, in check_success
    self.__stubmap.GetPostCallHooks().Call(self.__service, self.__method,
DeadlineExceededError

我不知道在哪里调查,因为这是一个随机问题。请帮忙 :)

4

0 回答 0