本文档介绍如何排查 App Engine 柔性环境中的 Cloud Endpoints 部署问题。如果向 API 发送请求后收到错误响应,请参阅排查响应错误问题,了解如何排查此类错误问题。
部署错误
本部分介绍如何排查 gcloud app deploy 错误。
错误消息
问题排查
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.
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-18。"],[[["\u003cp\u003eThis document provides troubleshooting guidance for Cloud Endpoints deployments in App Engine flexible environments, specifically addressing errors encountered during the \u003ccode\u003egcloud app deploy\u003c/code\u003e process.\u003c/p\u003e\n"],["\u003cp\u003eIf your deployment fails due to health checks, adjust the \u003ccode\u003eapp_start_timeout_sec\u003c/code\u003e setting in the \u003ccode\u003ereadiness_check\u003c/code\u003e section of your \u003ccode\u003eapp.yaml\u003c/code\u003e file, ensuring it's higher than the default of 300 seconds and ensuring all necessary Google Cloud services are enabled.\u003c/p\u003e\n"],["\u003cp\u003eWhen configuring \u003ccode\u003eapp.yaml\u003c/code\u003e, the \u003ccode\u003eendpoints_api_service\u003c/code\u003e section should include either \u003ccode\u003econfig_id\u003c/code\u003e or \u003ccode\u003erollout_strategy: managed\u003c/code\u003e, but not both, with \u003ccode\u003erollout_strategy: managed\u003c/code\u003e recommended for automatic service configuration updates.\u003c/p\u003e\n"],["\u003cp\u003eErrors related to \u003ccode\u003erollout_strategy\u003c/code\u003e indicate either an invalid combination of \u003ccode\u003econfig_id\u003c/code\u003e and \u003ccode\u003erollout_strategy\u003c/code\u003e settings or a missing \u003ccode\u003econfig_id\u003c/code\u003e when \u003ccode\u003erollout_strategy\u003c/code\u003e is not set to \u003ccode\u003emanaged\u003c/code\u003e, which is resolvable by modifying the \u003ccode\u003eapp.yaml\u003c/code\u003e file and redeploying.\u003c/p\u003e\n"],["\u003cp\u003eApp Engine logs, including crash, system and Endpoints logs, can be accessed via SSH to an instance to help pinpoint the source of issues, utilizing tools like tail to view log data.\u003c/p\u003e\n"]]],[],null,[]]