# 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'.

- **ID:** `policy/gcp-resource-manager-quota-exceeded`
- **Domain:** policy
- **Category:** resource_error
- **Error Code:** `403`
- **Verification:** ai_generated
- **Fix Rate:** 82%

## 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.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| GCP SDK 400.x | active | — | — |
| GCP SDK 410.x | active | — | — |
| GCP SDK 420.x | active | — | — |

## Workarounds

1. **Implement exponential backoff with jitter in your code to slow down request rate when hitting quota limits.
Example (Python):
  import time
  import random
  def call_with_backoff(client, request, max_retries=5):
      for i in range(max_retries):
          try:
              return client.execute(request)
          except Exception as e:
              if 'Quota exceeded' in str(e):
                  sleep_time = (2 ** i) + random.uniform(0, 1)
                  time.sleep(sleep_time)
              else:
                  raise
      raise Exception("Max retries exceeded")** (85% success)
   ```
   Implement exponential backoff with jitter in your code to slow down request rate when hitting quota limits.
Example (Python):
  import time
  import random
  def call_with_backoff(client, request, max_retries=5):
      for i in range(max_retries):
          try:
              return client.execute(request)
          except Exception as e:
              if 'Quota exceeded' in str(e):
                  sleep_time = (2 ** i) + random.uniform(0, 1)
                  time.sleep(sleep_time)
              else:
                  raise
      raise Exception("Max retries exceeded")
   ```
2. **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.
Example:
  Go to GCP Console > IAM & Admin > Quotas > Select 'Cloud Resource Manager API' > 'Read requests per minute per user' > Edit > Increase limit.** (70% success)
   ```
   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.
Example:
  Go to GCP Console > IAM & Admin > Quotas > Select 'Cloud Resource Manager API' > 'Read requests per minute per user' > Edit > Increase limit.
   ```
3. **Batch multiple read requests into a single API call using the 'getIamPolicy' or 'testIamPermissions' methods with multiple resources, reducing the number of requests.
Example:
  # Use list method with page size to reduce calls
  request = cloudresourcemanager_v3.Projects().list(pageSize=100)
  while request:
      response = service.projects().list(body=request).execute()
      # process response
      request = service.projects().list_next(request, response)** (75% success)
   ```
   Batch multiple read requests into a single API call using the 'getIamPolicy' or 'testIamPermissions' methods with multiple resources, reducing the number of requests.
Example:
  # Use list method with page size to reduce calls
  request = cloudresourcemanager_v3.Projects().list(pageSize=100)
  while request:
      response = service.projects().list(body=request).execute()
      # process response
      request = service.projects().list_next(request, response)
   ```

## Dead Ends

- **Retrying immediately after failure** — 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. (45% fail)
- **Creating a new service account** — 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. (60% fail)
- **Disabling and re-enabling the API** — 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. (80% fail)
