Is there a way to disable the built-in timing in App Engine dev_appserver?

I understand that it is dev_appserver.pydesigned to simulate the App Engine work environment as much as possible, but I am having problems debugging the application locally due to slow connection problems (I keep getting exceptions DeadlineExceededError). Since this is not the connection itself that I'm worried about, is there a way to temporarily disable / extend the timeout for urlfetch(and others) just for the development environment? Unfortunately, the application needs to be connected to the live web service, and I cannot just insert a dummy answer in this case.

This might be a simple fix for those who know more about the internals of the SDK, but I'm not very lucky in my Googling. I would appreciate any help or advice you may have.

+5
source share
1 answer

When launched on the development server, you can set a higher urlfetch deadline:

import os
if os.environ['SERVER_SOFTWARE'].startswith('Dev'):
    from google.appengine.api import urlfetch
    urlfetch.set_default_fetch_deadline(60)
+4
source

All Articles