Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h1>Which kind of DeadlineExceededError?</h1> <p>There are three kinds of <code>DeadlineExceededError</code> in AppEngine.<br> <a href="https://developers.google.com/appengine/articles/deadlineexceedederrors" rel="nofollow">https://developers.google.com/appengine/articles/deadlineexceedederrors</a></p> <blockquote> <ol> <li>google.appengine.runtime.DeadlineExceededError: raised if the overall request times out, typically after 60 seconds, or 10 minutes for task queue requests.</li> <li>google.appengine.runtime.apiproxy_errors.DeadlineExceededError: raised if an RPC exceeded its deadline. This is typically 5 seconds, but it is settable for some APIs using the 'deadline' option.</li> <li>google.appengine.api.urlfetch_errors.DeadlineExceededError: raised if the URLFetch times out.</li> </ol> </blockquote> <p>As you can see. The 10mins limit of <code>taskqueue</code> only help the<code>google.appengine.runtime.DeadlineExceededError</code>. The type of <code>DeadlineExceededError</code> can be identified via traceback (list below). In this case, it is <code>google.appengine.runtime.apiproxy_errors.DeadlineExceededError</code>. Which will raise in 5secs by default. (I will update the post after figure out how to change it)</p> <h2>TYPE 1. google.appengine.runtime.DeadlineExceededError</h2> <p>The traceback looks like</p> <pre><code>Traceback (most recent call last): File "/base/data/home/runtimes/python27/python27_lib/versions/1/google/appengine/runtime/wsgi.py", line 266, in Handle result = handler(dict(self._environ), self._StartResponse) File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1505, in __call__ rv = self.router.dispatch(request, response) File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1253, in default_dispatcher return route.handler_adapter(request, response) File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 1077, in __call__ return handler.dispatch() File "/base/data/home/runtimes/python27/python27_lib/versions/third_party/webapp2-2.3/webapp2.py", line 545, in dispatch return method(*args, **kwargs) File "/base/data/home/apps/s~tagtooadex2/test.371204033771063679/index.py", line 9, in get pass DeadlineExceededError </code></pre> <h3>Solution</h3> <p>This exception can be solved by using taskqueue (10mins), backend or manual scaling options. <a href="https://developers.google.com/appengine/docs/python/modules/#Python_Instance_scaling_and_class" rel="nofollow">https://developers.google.com/appengine/docs/python/modules/#Python_Instance_scaling_and_class</a></p> <h2>TYPE 2. google.appengine.runtime.apiproxy_errors.DeadlineExceededError</h2> <p>The traceback looks like </p> <pre><code>DeadlineExceededError: The API call remote_socket.Receive() took too long to respond and was cancelled. </code></pre> <h2>TYPE 3. google.appengine.api.urlfetch_errors.DeadlineExceededError</h2> <p>The traceback looks like</p> <pre><code>DeadlineExceededError: Deadline exceeded while waiting for HTTP response from URL: http://www.sogi.com.tw/newforum/article_list.aspx?topic_ID=6089521 </code></pre> <h3>Solution:</h3> <p>This exception can be solved by extend the deadline.</p> <pre><code>urlfetch.fetch(url, deadline=10*60) </code></pre> <p><a href="https://developers.google.com/appengine/docs/python/urlfetch/fetchfunction" rel="nofollow">https://developers.google.com/appengine/docs/python/urlfetch/fetchfunction</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload