ibolmo / cametrics

A RESTful logging system for Campaign Metrics

Home Page:http://cametrics.appspot.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DeadlineExceeded for namespace/values

ibolmo opened this issue · comments

Exception in request:
Traceback (most recent call last):
  File "/base/data/home/apps/cametrics/1.333614277205847806/common/zip-packages/django-1.0.2.zip/django/core/handlers/base.py", line 86, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/base/data/home/apps/cametrics/1.333614277205847806/myapp/views.py", line 60, in measurements
    return renderer.get(format)(request, format, data, stats, data_path)
  File "/base/data/home/apps/cametrics/1.333614277205847806/myapp/renderer.py", line 39, in render
    data_stats = map(Renderer.to_dict, stats)
  File "/base/data/home/apps/cametrics/1.333614277205847806/myapp/renderer.py", line 26, in to_dict
    return datum and datum.to_dict() or {}
  File "/base/data/home/apps/cametrics/1.333614277205847806/myapp/models.py", line 31, in to_dict
    return util.to_dict(self, attr_list, self.to_entity)
  File "/base/data/home/apps/cametrics/1.333614277205847806/util.py", line 33, in to_dict
    init_dict_func(values)
  File "/base/data/home/apps/cametrics/1.333614277205847806/myapp/models.py", line 102, in to_entity
    hist_dict[h.index].append(str(h.datum.key()))
  File "/base/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 2642, in __get__
    instance = get(reference_id)
  File "/base/python_lib/versions/1/google/appengine/ext/db/__init__.py", line 1066, in get
    entities = datastore.Get(keys)
  File "/base/python_lib/versions/1/google/appengine/api/datastore.py", line 219, in Get
    apiproxy_stub_map.MakeSyncCall('datastore_v3', 'Get', req, resp)
  File "/base/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 68, in MakeSyncCall
    apiproxy.MakeSyncCall(service, call, request, response)
  File "/base/python_lib/versions/1/google/appengine/api/apiproxy_stub_map.py", line 240, in MakeSyncCall
    stub.MakeSyncCall(service, call, request, response)
  File "/base/python_lib/versions/1/google/appengine/runtime/apiproxy.py", line 182, in MakeSyncCall
    rpc.Wait()
  File "/base/python_lib/versions/1/google/appengine/api/apiproxy_rpc.py", line 98, in Wait
    rpc_completed = self._WaitImpl()
  File "/base/python_lib/versions/1/google/appengine/runtime/apiproxy.py", line 104, in _WaitImpl
    rpc_completed = _apphosting_runtime___python__apiproxy.Wait(self)
DeadlineExceededError

There are 162 values. Takes about 20-30 secs to process.

Need to find the bottlenecks in the read traces.

Could implement a caching system with Memcache. Looking at the Cookbook for previously seen pluggable solutions.