尝试在 google 应用引擎上部署应用时出错

Error while trying to deploy app on google app engine

我正在使用灵活的运行时在 google 应用引擎上部署 python 3.6 脚本。我无法部署它,这是我收到的错误:

Updating service [default] (this may take several minutes)...failed.
ERROR: (gcloud.app.deploy) Error Response: [4] Timed out waiting for the app infrastructure to become healthy.

所以我检查了 gcloud app deploy --verbosity debug 出了什么问题,我得到了解释:

Updating service [default] (this may take several minutes)...|DEBUG: Operation [apps/[Project ID]/operations/2d76a22c-64d7-4e2e-95ee-7c01ee09d42a] not complete. Waiting to retry.

我一直在谷歌搜索并试图找到解决方案,我能得到的最接近的是这是我的 app.yaml 文件的问题。现在,我是第一次使用 .yaml 文件,所以我复制了 google 文档中的文件,并将入口点更改为我的脚本。

runtime: python
env: flex
entrypoint: python main.py

runtime_config:
  python_version: 3.6

# This sample incurs costs to run on the App Engine flexible environment.
# The settings below are to reduce costs during testing and are not appropriate
# for production use. For more information, see:
# https://cloud.google.com/appengine/docs/flexible/python/configuring-your-app-with-app-yaml
manual_scaling:
  instances: 1
resources:
  cpu: 1
  memory_gb: 0.5
  disk_size_gb: 10

我不知道我做错了什么,非常感谢帮助在 App Engine 上设置此脚本!

请耐心等待。有时需要比其他时间更长的时间。如果有错误,它会告诉你。如果有很多更新的文件,上传和保存它们需要一段时间。有时,您必须重试,因为后端可能会失败