title: Appengine task runs for 5 seconds before throwing DeadlineExceededError
body: <p>I have recently converted an app from using backends to modules. I was using backends for long running requests, primarily get requests to external url's (using the requests library). Since changing my app such that everything runs on the single default module I am getting DeadlineExceededError's. i.e.</p>
  
  <pre><code>DeadlineExceededError('The API call urlfetch.Fetch() took too long to respond and was cancelled.
  </code></pre>
  
  <p>I have read in the <a href="https://cloud.google.com/appengine/docs/python/modules/#Python_Instance_scaling_and_class" rel="nofollow">appengine documentation</a> that there is a:</p>
  
  <blockquote>
    <p>60-second deadline for HTTP requests, 10-minute deadline for tasks</p>
  </blockquote>
  
  <p>The requests I am running are run as a task (using deferred.defer(...) ). However the task starts at, for example, 15:51:54.489 and finishes at 15:51:59.600  - a grand total of 5 seconds before throwing the error.</p>
  
  <p>In app.yml automatic scaling enabled as follows:</p>
  
  <pre><code>automatic_scaling:
    min_idle_instances: 1
    max_idle_instances: 1
    max_pending_latency: 1s
  </code></pre>
  
  <p>It is not clear to me why this deadline error is being thrown. Could you please let me know how I can avoid throwing this error?</p>