I realize that dev_appserver.py
is meant to simulate the production App Engine environment as much as possible, but I'm having trouble debugging an app locally due to slow connection issues (I keep getting DeadlineExceededError
exceptions). Since it's not the connection itself that I'm concerned about, is there any way to temporarily disable/extend the timeout for urlfetch
(and others) just for the development environment? Unfortunately, the app does need to be connected to a live webservice, and I can't just patch in a dummy response in this case.
This may be a simple fix for someone who knows more about the innards of the SDK, but I haven't had much luck in my Googling. I would appreciate any help or advice you may have.
When running on the development server, you could set a higher default urlfetch deadline:
import os
if os.environ['SERVER_SOFTWARE'].startswith('Dev'):
from google.appengine.api import urlfetch
urlfetch.set_default_fetch_deadline(60)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With