You Just Died a Horrible death your app timed out, the world is ending around you. Deal with it. No, seriously, handle the exception and try it again it will work eventually.
Here is the code.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
from google.appengine.runtime import DeadlineExceededError
class MainPage(webapp.RequestHandler):
def get(self):
try:
# Do stuff...
except DeadlineExceededError:
self.response.clear()
self.response.headers['Location'] = response.geturl()
self.response.set_status(302)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Feel free to send Dancing Girls, Mermaids, Mountain Dew, or whatever else if this makes all your DEE issues go away. We are testing this for keeping free apps free. Server might get slow, but pages will always load. (unless you get 7 302’s then most browsers give up.)
--
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-a...@googlegroups.com.
To unsubscribe from this group, send email to google-appengi...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en.
You can’t sleep, it won’t work. Post should work in most modern browsers they will forward post data. Works in IE and chrome.
If the url changes Browsers get upset. If the url is the same most do not.
You are right, there are limitations this is not a silver bullet but it will help a lot.
If your post data was minimal you could convert it to get on the redirect.
OR… if you are really sneaky…
Log an error, put the post data on the error with a GUID, Redirect to a request with the guid. Grab the error from the Logs.
(logs work even when datastore doesn’t)
I’ll test that. I don’t know if Curl, and Fetch and other things follow 307s or not. Browsers do.
Both our ways are hacks, but if they work for 99% of users (with either method) 95% becomes 99.5%
From: google-a...@googlegroups.com [mailto:google-a...@googlegroups.com] On Behalf Of C Sowa
Sent: Monday, January 23, 2012 7:46 PM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Hide Dead Line Exceeded Errors from User (Python)
FYI, if you redirect a post with a 307 status, it will re-post the data to the new URL, any domain. Or at least this worked for me for years. In today's more locked-down environment, I haven't tried. Worth a shot.
--
You received this message because you are subscribed to the Google Groups "Google App Engine" group.
To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine/-/tqBQBIJFfTgJ.
Also, for quite a long time I've set lower deadlines on individual RPC
calls. This frequently allows you to quickly hit an RPC deadline and
try again within the first request; in a high percentage of cases it
will succeed the second try.
Robert
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
-----Original Message-----
From: google-a...@googlegroups.com
[mailto:google-a...@googlegroups.com] On Behalf Of Robert Kluin
Sent: Tuesday, January 24, 2012 11:33 AM
To: google-a...@googlegroups.com
Subject: Re: [google-appengine] Hide Dead Line Exceeded Errors from User
(Python)