UPSTREAM_TIMEOUT cloud network_error ai_generated true

UPSTREAM_TIMEOUT:连接到 VPC 连接器时请求超时。检查 VPC 连接器健康状况和子网容量。

UPSTREAM_TIMEOUT: The request timed out when connecting to the VPC connector. Check VPC connector health and subnet capacity.

ID: cloud/gcp-cloud-run-request-timeout-vpc-connector

其他格式: JSON · Markdown 中文 · English
80%修复率
87%置信度
1证据数
2023-09-10首次发现

版本兼容性

版本状态引入弃用备注
gcloud_cli active
cloud_run active
vpc_connector active

根因分析

Cloud Run 服务的 VPC 连接器(Serverless VPC Access)的子网 IP 地址已耗尽或配置不足,导致连接超时。

English

The Cloud Run service's VPC connector (Serverless VPC Access) has exhausted its subnet IP addresses or is underprovisioned, causing connection timeouts.

generic

官方文档

https://cloud.google.com/vpc/docs/configure-serverless-vpc-access

解决方案

  1. Increase the VPC connector's subnet size: `gcloud compute networks vpc-access connectors update my-connector --region us-central1 --min-instances 2 --max-instances 10` (if using scalable connector) or create a new connector with a /28 subnet (16 IPs) instead of /29 (8 IPs).
  2. Monitor VPC connector usage: `gcloud compute networks vpc-access connectors describe my-connector --region us-central1` and check `maxInstances` and `connectedProjects`. If near limits, deploy a second connector in a different subnet and route traffic via DNS.

无效尝试

常见但无效的做法:

  1. 85% 失败

    The timeout is at the VPC connector level, not the application; increasing the Cloud Run timeout doesn't affect the connector's IP exhaustion.

  2. 90% 失败

    More instances increase demand on the VPC connector, worsening IP exhaustion.