更新的运行状况检查会导致App Engine部署失败?

Mik*_*ike 10 google-app-engine google-cloud-platform

我们使用更新了google app引擎运行状况检查,从旧版本更新为新版本,现在部署失败。项目上的其他所有内容都没有改变。我们测试了默认设置,然后进行了扩展检查,以防万一。

这是错误: ERROR: (gcloud.app.deploy) Error Response: [4] 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.

这是我们的app.yaml:

liveness_check:
   check_interval_sec: 120
   timeout_sec: 40
   failure_threshold: 5
   success_threshold: 5
   initial_delay_sec: 500

readiness_check:
  check_interval_sec: 120
  timeout_sec: 40
  failure_threshold: 5
  success_threshold: 5
  app_start_timeout_sec: 1500
Run Code Online (Sandbox Code Playgroud)

不幸的是,无论配置如何,准备情况检查和活动检查都抛出404。

是什么原因引起的?以及如何调试呢?是否可以回滚到旧的健康检查?

小智 6

这通常是由于应用程序仍在从旧版运行状况检查标志读取和/或使用部署应用程序gcloud app deploy而未首先启用更新的运行状况检查引起的。您可以通过以下方式进行检查:

1-确保health_check您的app.yaml上不存在legacy 标志。

2-运行gcloud beta app describe以查看splitHealthChecks标志是否在下设置为true featureSettings

默认情况下,来自更新的运行状况检查的HTTP请求不会转发到您的应用程序容器。如果要将运行状况检查扩展到应用程序,请指定活动检查或准备情况检查的路径。

然后,您可以使用启用更新的运行状况检查gcloud beta app update --split-health-checks --project [your-project-id]。有关更多详细信息,请参阅此公共问题跟踪程序或有关“ 更新的健康检查”的文章。


小智 6

就我而言,我通过手动增加内存分配解决了这个问题?

resources:
    cpu: 1
    memory_gb: 2
    disk_size_gb: 10
Run Code Online (Sandbox Code Playgroud)

在谷歌论坛中找到了这个解决方案:https : //groups.google.com/forum/#!topic/ google-appengine/ Po_-SkC5DOE