python - App Engine Python 模块基本和手动缩放不起作用

标签 python google-app-engine

我的 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/

相关文章:

Python curses - 无法获取 TAB 键

python - 将数据拟合到 DecisionTreeRegressor 时出现 KeyError

java - 在 Google App Engine 中运行 Google Cloud Dataflow 管道时为 "ClassNotFoundException: sun.security.provider.Sun"

django - 将 GAE Django 应用程序移植到 Azure AppFabric

python - 使用 anaconda 注册可自定义的环境变量

python - 用numba找到两个向量之间的最小差异

python - from ... import * 使用 __import__ 函数

python - 如何在 Google App Engine 上正确安装 httplib2?

java - 处理 HardDeadlineExceededError 的任务策略

python - Google App Engine 上的 Mapreduce