Hi Derrick, What DeadlineExceedError message are you getting, there are a few different deadlines you can run in to with App Engine.
The most common would be the request deadline. Any given request with App Engine must be completed within 10 seconds. This is the runtime DeadlineExceededError Various APIs, like the datastore and URLFetch also have deadlines to ensure that those calls return within the overall request deadline. If you are running in to this deadline, you will get the apiproxy_errors.DeadlineExceededError. The problem shouldn't have anything to do with indexing, since simple queries indexes are automatically generated, there is no need specify them in the index.yaml (see this article: http://code.google.com/appengine/articles/index_building.html) >From your description I can imagine the problem is either you are requesting too much information from the datastore (running in to apiproxy_errors.DeadlineExceededError) in one request. The amount of data you can return in a query will depend on the size and shape of your data, but you can test this by reducing the amount of data you query for in one call. The other issue I can see is that you are just taking too long to return the entire request. This probably happens because it takes too long to process all of your results before the request deadline. Generally in such a case we'd suggest profiling your application which will indicate on which calls, and for how long, your app spends it's time. Some good information on profiling can be found in our FAQ: http://code.google.com/appengine/kb/commontasks.html#profiling Screencast: Optimizing Your App: Profiling and Memcache http://www.youtube.com/watch?v=Zip1G6-NiMM And the Google I/O talk 'Building a Production Quality Application on Google App Engine: http://sites.google.com/site/io/best-practices---building-a-production-quality-application-on-google-app-engine -Marzia On Thu, Dec 18, 2008 at 10:39 AM, Derrick <[email protected]> wrote: > > I am consistently getting Deadline exceeded messages. The problem is > that my individual requests are trivial: do a query or two to > BigTable, serialize the results, and return them. > > So, what could be causing these messages. How are deadlines actually > measured on app engine? > > In my case, I am sending a number (10-50) of requests in parallel. > Each individual request retrieves a single row in a table plus one or > two rows in related tables. > > I would guess that that CPU time usage is measured by interrupting the > thread serving a request at regular intervals. The question is, how > does this interrupt ascertain whether a CPU deadline has been > exceeded. > > I hypothesize that when the poller wakes up, it checks to see which > application has the cpu, and adds a tick to the count for that user. > If the same application is using the CPU as the previous time the > poller awoke, then the poller checks to see if the tick count exceeds > the deadline. If so, it initiates a deadline exceeded message and > terminates the request. > > If this is the algorithm, then it is very problematic for me. Will > someone from the Google App Engine team explain to us the workings of > the Deadline measuring algorithm so that we can adjust our application > for work on the platform. > > Also, could the problem have anything to do with indexing? Our > queries are dirt simple: a single query parameter, so we do not > generate indices for them manually. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
