google.appengine.runtime.DeadlineExceededError sol

2019-08-04 08:30发布

My appengine application often throws out this exception. This is because appengine application is blocked in China, so I uses third party service to bypass the blocking. My application needs to call the APIs, which is in China, to fulfill the requests. I know many of you have no this problem, please for help. I know the limit is 30 seconds.I can't let google to lengthen it.

1条回答
够拽才男人
2楼-- · 2019-08-04 09:13

You could use a Task Queue to do the actual request and either have the client poll for a result or use the Channel API. This would increase your limit to 10 minutes instead of 30 seconds.

So, for example:

  • Browser makes request via AJAX
  • Server returns Channel token and kicks off Task
  • Browser opens channel and waits for response
  • Task provides browser response via channel
查看更多
登录 后发表回答