App Engine Python模块基本和手动缩放不起作用 [英] App Engine Python module Basic and Manual scaling not working

查看:104
本文介绍了App Engine Python模块基本和手动缩放不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Google App Engine应用程序需要进行漫长的计算。在我的模块上自动缩放会返回 DeadlineExceededError ,所以我尝试切换到手动和基本缩放。对于基本缩放,


$ b

  instance_class:B2 
basic_scaling:
max_instances:5 $ b我将它添加到我的yaml文件中。 $ b idle_timeout:10m

但是当我向模块发送URL请求时, 56:

  / _ ah / start 404 
没有处理程序与此URL匹配。

然后最终返回:

  HTTPError:HTTP错误503:服务不可用

这对我的yaml文件:

  instance_class:B2 
manual_scaling:
实例:1

但是,当我向模块发送URL请求时,经过一段时间,我得到:

  HTTPError:HTTP错误503:服务不可用

但没有记录。



我错过了什么?我是否需要为 / _ ah / start 放置一个处理程序?我认为一个404是可以接受的,以启动该模块。

解决方案

想通了。



我补充说:

   -  url:/ _ah / start 
script:colors.handler.app

我的处理程序:并且工作。


My Google App Engine application needs to run a lengthy calculation. Automatic scaling on my module returns DeadlineExceededError, so I tried switching to manual and basic scaling.

For basic scaling, I added this to my yaml file.

instance_class: B2
basic_scaling:
  max_instances: 5
  idle_timeout: 10m

But when I send a URL request to the module, my logs get flooded with 56:

/_ah/start 404
No handlers matched this URL.

Then eventually returns:

HTTPError: HTTP Error 503: Service Unavailable

For manual scaling, I added this to my yaml file:

instance_class: B2
manual_scaling:
    instances: 1

But when I send a URL request to the module, after a while I get:

HTTPError: HTTP Error 503: Service Unavailable

But nothing in the logs.

What am I missing? Do I need to put a handler for /_ah/start? I thought a 404 was acceptable to start the module.

解决方案

Figured it out. I had to add a handler to my module.

I added:

- url: /_ah/start
  script: colors.handler.app

to my handlers: and it worked.

这篇关于App Engine Python模块基本和手动缩放不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆