Hope this is the right place to ask this question: I am using DjangoAppengine, a wrapper arround Python Appengine which provides the ability to work with Django on Appengine. I am trying to query a table which has more 10.000 entries. Unfortunately appengine raises this error:
Timeout: The datastore operation timed out, or the data was temporarily unavailable. I am doing my query on a backend, to avoid the 60 seconds limit which is imposed by the standard machines. I think that there is anyway a 60 seconds time limit on datastore queries. I tried to understand what happens by using appstats, which provides the chart attached in the screenshot. As you can see there are a lot if Next(). I thought this would run the next batches in order to get all the results and avoiding the 60 seconds query limit. But this does not seem the case. I know that cursors should be "the way" to avoid this issue. This is a snippet from the google provided documentation at: https://cloud.google.com/appengine/docs/python/datastore/query-cursors # Start a query for all Person entities people = Person.all() # If the application stored a cursor during a previous request, use it person_cursor = memcache.get('person_cursor') if person_cursor: people.with_cursor(start_cursor=person_cursor) # Iterate over the results for person in people: # Do something The question is, when i use the person in people statement, should i use break from the for statement and the collect the cursor to avoid the timeout issue? >From the code above seems that I iterate over all the "Person" object without caring about the cursor. Thanks, Andrea -- You received this message because you are subscribed to the Google Groups "Google App Engine" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-appengine+unsubscr...@googlegroups.com. To post to this group, send email to google-appengine@googlegroups.com. Visit this group at https://groups.google.com/group/google-appengine. To view this discussion on the web visit https://groups.google.com/d/msgid/google-appengine/01d39150-ea36-4eb8-9641-557eba8e0521%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.