Deadline exceeded while posting multiple cards to timelines with a video attached

早过忘川 提交于 2019-12-03 09:04:52

I too was experiencing this type of issue. In order to solve it, I had to increase the timeout for HTTP requests as well as move to a Queue.

I submitted a pull request to the Google Mirror API Python example, but it got rejected to keep things "simple".

You can checkout my diff at https://github.com/JessieAMorris/mirror-quickstart-python/commit/b67c0ecdf83207b0c3b596173c95a53804b23525.

Basically, the synopsis is:

  1. Move processing to a queue
  2. import urlfetch and httplib2
  3. Increase the timeouts for urlfetch and httplib2 like so:

    urlfetch.set_default_fetch_deadline(45)
    httplib2.Http(timeout=45) 
    

With those changes in place, I don't get timeouts any more.

You have 60 seconds to complete a front-end request on Google App Engine. Locally however, that restriction doesn't seem to stick.

Your only options for longer processing are task queues (10 minute deadline) and backends (indefinite).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!