App Engine Flexible部署未能在分配的时间内正常运行



我的flask应用程序部署通过app Engine Flex是超时和设置debug=True后。我看到下面这行一遍又一遍地重复,直到它失败。但是我不确定这是什么,在日志资源管理器中找不到任何有用的东西。

Updating service [default] (this may take several minutes)...working DEBUG: Operation [apps/enhanced-bonito-349015/operations/81b83124-17b1-4d90-abdc-54b3fa28df67] not complete. Waiting to retry.

谁能分享一下解决这个问题的建议?

这是我的app.yaml(我认为这是由于内存问题…):

runtime: python
env:flex
entrypoint: gunicorn - b :$PORT main:app
runtime_config:
python_version:3
resources:
cpu:4
memory_gb: 12
disk_size_gb: 1000
readiness_check:
path: "/readines_check"
check_interval_sec: 5
timeout_sec: 4
failure_threshold: 2
success_threshold: 2
app_start_timeout_sec: 300

错误日志:

ERROR: (gcloud.app.deploy) Error Response: [4] An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>2022-05-10T23:21:10.941Z47607.vt.0: Your deployment has failed to become healthy in the allotted time and therefore was rolled back. If you believe this was an error, try adjusting the 'app_start_timeout_sec' setting in the 'readiness_check' section.

可能有解决此类部署错误的方法。

  1. 增大app_start_timeout_sec的值至最大值1800
  2. 确保所有端点和ESP需要的Google Cloud服务都在你的项目上启用。
  3. 假设启用了splitHealthChecks功能,请确保遵循从旧版本迁移所需的所有步骤。

最新更新