Hi there,
I'm in the process of moving the database part of a social networking
site to GAE.
Each client sends a request to the server every 5 minutes with
location information. From the location I calculate a list of geoboxes
to store with the client's profile if the location is significantly
different from the last request.

If I get requests more often than every 5 minutes, I send back an
empty response (clients send unique id, so a 5 minute memcache object
will tell me if I receive too many requests) so as not to burden the
server too much.


I already have a server up and running (apache, php, postgres) - and I
am experimenting with forwarding requests to GAE to measure load and
performance.

In general everything looks good, but I am getting the occational
error on the server:

One error I get is the datastore timeout. I am quite certain that I
write a record at max. every 5 minutes. For that record I only have
one composite index, and that index only has one list entry - so I
don't have 'exploding indexes'. Although the list may have 30-40
entries, so 30-40 index entries must be created.

The second error I get - less frequently - is data contention. The
record I update (still at max every 5 mins) is unique to each user, so
I don't understand where the contention comes from.

The last error is actually the one that puzzles me the most. Timeout
while doing datastore fetches. Traceback is similar to:

Traceback (most recent call last):
  File "/base/python_lib/versions/1/google/appengine/ext/webapp/
__init__.py", line 501, in __call__
    handler.get(*groups)
  File "/base/data/home/apps/grindrservr/3.332855696947742792/
main.py", line 870, in get
    user = User.get_by_key_name(key_name)
  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 849, in get_by_key_name
    return get(*keys)
  File "/base/python_lib/versions/1/google/appengine/ext/db/
__init__.py", line 1044, in get
    entities = datastore.Get(keys)
  File "/base/python_lib/versions/1/google/appengine/api/
datastore.py", line 221, in Get
    raise _ToDatastoreError(err)
  File "/base/python_lib/versions/1/google/appengine/api/
datastore.py", line 1965, in _ToDatastoreError
    raise errors[err.application_error](err.error_detail)
Timeout

As far as I can tell the get_by_key_name should be so fast that it's
basically instant, so I don't understand the timeout here.

I should state that out of maybe 300.000 requests only about 30 fail,
so that may actually be quite ok. But I would like to understand the
errors and if possible program my way around them.

Any comments greatly appreciated.

Sincerely,
/morten

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to