当我部署 App Engine Flex 时,我突然开始收到此错误。
我得到的完整错误如下
googlecloudsdk.api_lib.app.operations_util.OperationError: Error Response: [4] An internal error occurred while processing task /app-engine-flex/flex_await_healthy/flex_await_healthy>2024-02-11T09:54:47.328Z208.wa.2: Timed out waiting for the app infrastructure to become healthy.
这是我使用的yaml文件。
runtime: custom
api_version: '1.0'
env: flexible
service: service-name
automatic_scaling:
min_num_instances: 1
max_num_instances: 1
resources:
cpu: 1
memory_gb: 1
disk_size_gb: 15
readiness_check:
app_start_timeout_sec: 1800
beta_settings:
cloud_sql_instances: sql-instance
vpc_access_connector:
name: vonnector-name
egress_setting: all-traffic
network:
name: network-name
includes:
- secrets.yaml
我按照文档进行操作,并确保服务具有正确的权限。
https://cloud.google.com/appengine/docs/flexible/troubleshooting#healthy-time-out
以下是尝试过的事情
基于最近的错误消息
Updating service. Operation not complete. Waiting to retry
。
问题的根本原因似乎是
Constraints
。可以在云控制台查看活动日志吗?您可以参考这个文档。
此外,由于与 App Engine 和 Compute Engine 关联的项目中的配额,也可能会出现上述错误。需要记住的是,App Engine Flex 在虚拟机中运行。还有一个类似的Issue,与配额相关:
In-use IP addresses
。还要检查其他配额,如 CPU 核心、内存。在 Cloud Console 中检查其配额页面,确保其未接近任何限制,并请求增加接近的配额。
此外,如果您使用共享 VPC 配置来部署应用程序,请确保您启用了所需的权限。
或者,您可以尝试运行以下命令吗 将字段“PROJECT_ID”替换为您的 Google Cloud 项目 ID 然后尝试重新部署,这可能会帮助您解决问题。
gcloud config set interactive/hidden true
gcloud app update--service-account=<PROJECT_ID>@appspot.gserviceaccount.com
gcloud config set interactive/hidden false ```
还可以尝试按照
package.json
在您的 gcp-build
文件中添加一个带有空值的 gcp-build 脚本。请参阅文档,了解有关在 package.json 文件中添加 gcp-build 的更多信息。
如果上述建议没有帮助,那么可能会发现该问题是专门针对您的项目的,需要进行项目检查。最好联系 Google 支持 进行同样的操作。