我们将谷歌应用程序引擎运行状况检查从旧版本更新为新版本,现在我们的部署失败了。该项目的其他内容没有改变。我们测试了默认设置,然后进行了扩展检查以防万一。
这是错误: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
不幸的是,无论配置如何,就绪性和活动性检查都会抛出 404。
可能是什么原因导致了这个问题?我们如何调试这个?
是否可以回滚到旧版健康检查?
这通常是当应用程序仍在读取旧版运行状况检查标志和/或使用以下命令部署应用程序时引起的:gcloud app deploy
无需先启用更新的运行状况检查。您可以通过以下方式检查:
1-确保遗产health_check
您的 app.yaml 中不存在该标志。
2- Run gcloud beta app describe
看看是否splitHealthChecks
标志设置为 true 下featureSettings
.
默认情况下,来自更新的运行状况检查的 HTTP 请求不会转发到您的应用程序容器。如果要将运行状况检查扩展到应用程序,请指定活动检查或就绪检查的路径。
然后,您可以使用以下命令启用更新的运行状况检查gcloud beta app update --split-health-checks --project [your-project-id]
. See 这个公共问题跟踪器 https://issuetracker.google.com/65500706或这篇文章关于更新的健康检查 https://cloud.google.com/appengine/docs/flexible/nodejs/configuring-your-app-with-app-yaml#updated_health_checks有关更多详细信息。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)