I have these types of errors and guido suggested that they might be
datastore time outs in disguise.
To fix the problem put a try catch around the get() call and execute
the statement again by using a while loop and an attempt counter, this
counter is incremented in the catch clause.
attempt = 1
while attempt<3:
try:
....get() call
catch Error:
attempt += 1
break
else:
# get failed multiple times
pass
2009/3/21 Denis Moskalets <[email protected]>:
>
> Hi.
> I have two identical applications.
> First -- for test purposes.
> Second -- real work app.
>
> So, few days ago i've tested pushing a lot of data from my computer to
> application. With the first app there were no problems.
> But with the second app i've got ~5 timeout errors!
>
> All in all, in the second app i regulary get this error. Sometimes, it
> occures on the first query to db in app!
>
> So, i think, it's a problem with a particular application.
> Appid: ctms-release.
>
> Can you check it?
>
> Example of traceback:
>
> Traceback (most recent call last):
> File "/base/data/home/apps/ctms-release/1.332151903175237692/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/ctms-release/1.332151903175237692/ctms/
> rolesFunc.py", line 21, in wrapper
> if not request.user.is_active:
> File "/base/data/home/apps/ctms-release/1.332151903175237692/common/
> appenginepatch/ragendja/auth/middleware.py", line 19, in __get__
> request._cached_user = User.get_djangouser_for_user(user)
> File "/base/data/home/apps/ctms-release/1.332151903175237692/ctms/
> models.py", line 306, in get_djangouser_for_user
> django_user = cls.gql("WHERE user = USER(:1)",e).get()
> File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 1346, in get
> results = self.fetch(1)
> File "/base/python_lib/versions/1/google/appengine/ext/db/
> __init__.py", line 1390, in fetch
> raw = self._get_query().Get(limit, offset)
> File "/base/python_lib/versions/1/google/appengine/api/datastore.py",
> line 942, in Get
> return self._Run(limit, offset)._Next(limit)
> File "/base/python_lib/versions/1/google/appengine/api/datastore.py",
> line 886, in _Run
> _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
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---