HI Blake
The strategy I have taken (and this works most of the time)
is in my main I import almost nothing except the bare minimum of app
engine apis
import logging
logging.getLogger().setLevel(logging.DEBUG)
import os, sys
from google.appengine.ext.webapp import Request,RequestHandler,
Response
from google.appengine.api import users
from google.appengine.api import memcache
from google.appengine.runtime import DeadlineExceededError
from google.appengine.ext.webapp.util import run_wsgi_app
Thats it,
Then in main I try and serve the page from memcache for anon users,
if the page isn't present I then start my imports for the full
application stack.
I have found that if the page in question is in memcahce I never get
the DeadLineExceededError, when they are occuring.
and I know they are occuring, If a logged user at tries at the same
time (they never get a cached page ) I am getting
DeadLineExceededErrors.
This behaviour is very consistent when we get hit with a long period
of slow instance spin ups which result in deadlines exceeded.
I am not using Django or webapp but my typical cold start time is
around 4sec. So I am experiencing a bit of grief too.
But almost never for a cached page. (Except when the system gets so
bad that even static handlers fail with DeadLineExceeded)
I am not sure how applicable this approach is for other app stacks.
Rgds
T