我的 Google App Engine 应用程序需要运行长时间的计算。我的模块的自动缩放返回 DeadlineExceededError
,因此我尝试切换到手动和基本缩放。
对于基本缩放,我将其添加到我的 yaml 文件中。
instance_class: B2
basic_scaling:
max_instances: 5
idle_timeout: 10m
但是当我向模块发送 URL 请求时,我的日志中充满了 56:
/_ah/start 404
No handlers matched this URL.
然后最终返回:
HTTPError: HTTP Error 503: Service Unavailable
对于手动缩放,我将其添加到我的 yaml 文件中:
instance_class: B2
manual_scaling:
instances: 1
但是当我向模块发送 URL 请求时,过了一会儿我得到:
HTTPError: HTTP Error 503: Service Unavailable
但日志中没有任何内容。
我错过了什么?我需要为 /_ah/start
放置一个处理程序吗?我认为 404 可以接受以启动该模块。
最佳答案
想通了。我必须向我的模块添加一个处理程序。
我补充说:
- url: /_ah/start
script: colors.handler.app
到我的处理程序:
,它成功了。
关于python - App Engine Python 模块基本和手动缩放不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17822721/