{
  "id": "policy/gcp-resource-manager-quota-exceeded",
  "signature": "Error 403: Quota exceeded for quota metric 'Read requests' and limit 'Read requests per minute per user' of service 'cloudresourcemanager.googleapis.com' for consumer 'project_number:123456789'.",
  "signature_zh": "错误 403：对于项目编号为 123456789 的消费者，服务 'cloudresourcemanager.googleapis.com' 的配额指标 '读取请求' 和限制 '每分钟每用户读取请求' 已超出配额。",
  "regex": "Error 403: Quota exceeded for quota metric 'Read requests' and limit 'Read requests per minute per user' of service 'cloudresourcemanager\\.googleapis\\.com'",
  "domain": "policy",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The Cloud Resource Manager API has a per-user per-minute read request quota (default 60/min) that is being exceeded by automated scripts or CI/CD pipelines making too many API calls in a short period.",
  "root_cause_type": "generic",
  "root_cause_zh": "Cloud Resource Manager API 有每分钟每用户的读取请求配额（默认 60/分钟），自动化脚本或 CI/CD 流水线在短时间内发出过多 API 调用导致超出该配额。",
  "versions": [
    {
      "version": "GCP SDK 400.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "GCP SDK 410.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "GCP SDK 420.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Retrying immediately after failure",
      "why_fails": "Simply retrying the request after a short delay may work temporarily but the quota will be exceeded again if the same rate of requests continues.",
      "fail_rate": 0.45,
      "condition": "",
      "sources": []
    },
    {
      "action": "Creating a new service account",
      "why_fails": "Creating a new service account and re-running the script will still hit the same per-user quota limit if the script makes requests at the same rate.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "Disabling and re-enabling the API",
      "why_fails": "Disabling and re-enabling the Cloud Resource Manager API does not reset the quota counter; the quota is based on per-user usage over time.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Implement exponential backoff with jitter in your code to slow down request rate when hitting quota limits.\nExample (Python):\n  import time\n  import random\n  def call_with_backoff(client, request, max_retries=5):\n      for i in range(max_retries):\n          try:\n              return client.execute(request)\n          except Exception as e:\n              if 'Quota exceeded' in str(e):\n                  sleep_time = (2 ** i) + random.uniform(0, 1)\n                  time.sleep(sleep_time)\n              else:\n                  raise\n      raise Exception(\"Max retries exceeded\")",
      "success_rate": 0.85,
      "how": "Implement exponential backoff with jitter in your code to slow down request rate when hitting quota limits.\nExample (Python):\n  import time\n  import random\n  def call_with_backoff(client, request, max_retries=5):\n      for i in range(max_retries):\n          try:\n              return client.execute(request)\n          except Exception as e:\n              if 'Quota exceeded' in str(e):\n                  sleep_time = (2 ** i) + random.uniform(0, 1)\n                  time.sleep(sleep_time)\n              else:\n                  raise\n      raise Exception(\"Max retries exceeded\")",
      "condition": "",
      "sources": []
    },
    {
      "action": "Request a quota increase from GCP console for the Cloud Resource Manager API read requests per minute per user. This requires filing a support ticket.\nExample:\n  Go to GCP Console > IAM & Admin > Quotas > Select 'Cloud Resource Manager API' > 'Read requests per minute per user' > Edit > Increase limit.",
      "success_rate": 0.7,
      "how": "Request a quota increase from GCP console for the Cloud Resource Manager API read requests per minute per user. This requires filing a support ticket.\nExample:\n  Go to GCP Console > IAM & Admin > Quotas > Select 'Cloud Resource Manager API' > 'Read requests per minute per user' > Edit > Increase limit.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Batch multiple read requests into a single API call using the 'getIamPolicy' or 'testIamPermissions' methods with multiple resources, reducing the number of requests.\nExample:\n  # Use list method with page size to reduce calls\n  request = cloudresourcemanager_v3.Projects().list(pageSize=100)\n  while request:\n      response = service.projects().list(body=request).execute()\n      # process response\n      request = service.projects().list_next(request, response)",
      "success_rate": 0.75,
      "how": "Batch multiple read requests into a single API call using the 'getIamPolicy' or 'testIamPermissions' methods with multiple resources, reducing the number of requests.\nExample:\n  # Use list method with page size to reduce calls\n  request = cloudresourcemanager_v3.Projects().list(pageSize=100)\n  while request:\n      response = service.projects().list(body=request).execute()\n      # process response\n      request = service.projects().list_next(request, response)",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "在代码中实现带抖动的指数退避，以在达到配额限制时减慢请求速率。\n示例（Python）：\n  import time\n  import random\n  def call_with_backoff(client, request, max_retries=5):\n      for i in range(max_retries):\n          try:\n              return client.execute(request)\n          except Exception as e:\n              if 'Quota exceeded' in str(e):\n                  sleep_time = (2 ** i) + random.uniform(0, 1)\n                  time.sleep(sleep_time)\n              else:\n                  raise\n      raise Exception(\"Max retries exceeded\")",
    "从 GCP 控制台请求增加 Cloud Resource Manager API 每分钟每用户读取请求的配额。这需要提交支持工单。\n示例：\n  转到 GCP 控制台 > IAM 和管理 > 配额 > 选择 'Cloud Resource Manager API' > '每分钟每用户读取请求' > 编辑 > 增加限制。",
    "将多个读取请求批处理到单个 API 调用中，使用 'getIamPolicy' 或 'testIamPermissions' 方法处理多个资源，从而减少请求数量。\n示例：\n  # 使用 list 方法并设置较大的 page size 以减少调用次数\n  request = cloudresourcemanager_v3.Projects().list(pageSize=100)\n  while request:\n      response = service.projects().list(body=request).execute()\n      # 处理响应\n      request = service.projects().list_next(request, response)"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://cloud.google.com/resource-manager/docs/limits",
  "official_doc_section": null,
  "error_code": "403",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.82,
  "resolvable": "partial",
  "first_seen": "2023-08-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}