【发布时间】:2026-02-14 19:25:06
【问题描述】:
我正在努力在具有灵活运行时的谷歌应用引擎上部署 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
我不知道自己做错了什么,非常感谢帮助在应用引擎上设置此脚本!
【问题讨论】:
标签: python-3.x google-app-engine google-cloud-platform gcloud app.yaml