Compute Engine concurrent operation quotas


This document describes the concurrent operation quotas for Compute Engine.

Concurrent operation quotas

Concurrent operation quotas define the number of in-flight or concurrent operations that can occur at any point of time. Any API request that creates, modifies, or deletes a Compute Engine resource is subject to a concurrent operation limit check to ensure that the total number of in-flight operations at any point of time does not exceed the limit specified for that operation.

Concurrent operation limit exceeded error

If your project exceeds the concurrent operation limit for any in-flight operation, you receive a 403 error with the reason rateLimitExceeded.

The API response of the error looks similar to the following:

    "error": {
      "code": 403,
      "message": "Rate Limit Exceeded",
      "errors": [
        {
          "message": "Rate Limit Exceeded",
          "domain": "usageLimits",
          "reason": "rateLimitExceeded",
        ...
        ...
        }
      ],
      "details": [
        {
          "@type": "type.googleapis.com/google.rpc.ErrorInfo",
          "reason": "CONCURRENT_OPERATIONS_QUOTA_EXCEEDED",
          "domain": "compute.googleapis.com",
          "metadatas": {
            "containerType": "PROJECT",
            "containerId": "PROJECT_ID",
            "quotaMetric": "QUOTA_METRIC",
            "quotaLimit": "QUOTA_LIMIT",
            "operationType": "OPERATION_TYPE",
            "location": "global | REGION"
          }
        },
        {
          "@type": "type.googleapis.com/google.rpc.Help",
          "links": [
            {
              "description": "Concurrent operations quota documentation.",
              "url": "https://cloud.google.com/compute/operations-quota#concurrent_operation_limits"
            }
          ]
        },
      ...
      ... 

The error details contain the following values:

  • PROJECT_ID: the ID of the project in which the quota exceeds the limit.

  • QUOTA_METRIC: the metric for the concurrent quota that exceeds the limit. It can be one of the following:

    • compute.googleapis.com/global_concurrent_operations
    • compute.googleapis.com/regional_concurrent_operations
  • QUOTA_LIMIT: the limit name of the concurrent quota. It can be one of the following:

    • GlobalConcurrentOperationsPerProject
    • GlobalConcurrentOperationsPerProjectOperationType
    • RegionalConcurrentOperationsPerProject
    • RegionalConcurrentOperationsPerProjectOperationType
  • OPERATION_TYPE: the global or regional operation for which the quota exceeds the limit. For a list of operations, see Concurrent operation quota groups.

  • The location can be one of the following:

    • global: specifies that the limit exceeded for global operation quota
    • REGION: specifies the region where the limit exceeded for the operation quota

The detailed error logs are returned only through API response. Error in Logs Explorer is similar to the following:

   "protoPayload":{
    "@type": "type.googleapis.com/google.cloud.audit.AuditLog",
    "status": {
      "message": "Rate Limit Exceeded"
    }
    "serviceName": "compute.googleapis.com",
    "methodName": "METHOD_NAME",
    ...
    ...
    "response": {
      "error": {
        "message": "Rate Limit Exceeded",
        "code": 403,
        "errors": [
          {
            "message": "Rate Limit Exceeded",
            "reason": "rateLimitExceeded",
            "domain": "usageLimits"
          }
        ]
      },
      "@type": "type.googleapis.com/error"
    },
    ...
    ... 

The METHOD_NAME in the error represents the API method for which the rate limit exceeded. For example, v1.compute.instances.stop.

Concurrent operation quota groups

This section describes the limits for various Compute Engine in-flight or concurrent operations.

Global operation quotas

Concurrent global operations consume a global limit that is specified for operation types per project. The following table lists the global quotas for in-flight operations and the corresponding metrics.

You can view the quota for global operations by using the Google Cloud console, Google Cloud CLI, and Service Usage API. For more information, see View concurrent operation quotas and limits.

Quota name
Description
Metric name Methods that consume this quota
Concurrent global operations per project
Limits the total number of concurrent global operations for a project.

View this quota in the Google Cloud console

compute.googleapis.com/global_concurrent_operations

All global methods.

The HTTP request URL contains global for these methods. For example, the networks.insert method:
POST /compute/v1/projects/{project}/global/networks

Concurrent global operations per project operation type
Limits the number of concurrent operations per project per operation type.

View this quota in the Google Cloud console

compute.googleapis.com/global_concurrent_operations

All global methods.

The default concurrent operation quota is 500 in-flight operations per project, except for the following methods, which have different default limits:

globaladdresses.move

firewalls.delete

firewalls.insert

images.delete

images.deprecate

images.insert

images.patch

images.setLabels

images.setIamPolicy

licenses.insert

machineimages.delete

machineimages.insert

networks.addPeering

networks.removePeering

networks.updatePeering

projects.setCommonInstaneMetadata

publicAdvertisedPrefixes.delete

publicAdvertisedPrefixes.insert

routes.delete

routes.insert

securityPolicies.patchRule

snapshots.delete

snapshots.insert

snapshots.setLabels

snapshots.setIamPolicy

snapshotSettings.patch

Regional operation quotas

Concurrent regional operations consume a regional limit that is specified for operation types per project in a given region.

The following table lists the regional quotas for in-flight operations and the corresponding metrics.

You can view the quota for regional operations by using the Google Cloud console, Google Cloud CLI, and Service Usage API. For more information, see View concurrent operation quotas and limits.

Quota name
Description
Metric name Methods that consume this quota
Concurrent regional operations per project
Limits the total number of concurrent regional operations for a project.

View this quota in the Google Cloud console

compute.googleapis.com/regional_concurrent_operations

All regional methods.

The HTTP request URL contains regions or zones for these methods.
For example, the instances.insert method:
POST /compute/v1/projects/{project}/zones/{zone}/instances

Concurrent regional operations per project operation type
Limits the number of concurrent regional operations per project per operation type.

View this quota in the Google Cloud console

compute.googleapis.com/regional_concurrent_operations

All regional methods.

The default concurrent operation quota is 500 in-flight operations per project per region, except for the following methods, which have different default limits:

addresses.move

disks.insert

instances.delete

instances.insert

instances.simulateMaintenanceEvent

networkEndpointGroups.attachNetworkEndpoints

networkEndpointGroups.detachNetworkEndpoints

publicDelegatedPrefixes.delete

publicDelegatedPrefixes.insert

View concurrent operation quotas and limits

To view the quota usage and limits in a project, do the following:

Console

  1. In the Google Cloud console, go to the Quotas page.

    Go to Quotas

    The Quotas page lists all quota usage and limits for your project. By default, the list is sorted to show your most used quotas first, which helps you see limits that are at risk of being exceeded.

  2. To filter the list and to view the usage and limit for any specific quota, select the Quota or Metric in the Filter field.

    For example, select the Quota Concurrent global operations per project operation type to see the quota usage for global methods per operation type.

    To filter the quota for a specific operation, add Dimensions to the filter query and select the operation_type. For example, select firewalls_insert to see the quota usage and limit for firewalls.insert operation.

gcloud

You can use the Google Cloud CLI to view the usage and limit of concurrent operation quotas.

To use this approach, ensure that you have installed the alpha commands component. If you're using Cloud Shell to interact with Google Cloud, the Google Cloud CLI is installed for you.

To view the quota, use the following command:

gcloud alpha services quota list \
    --service=compute.googleapis.com \
    --consumer=projects/PROJECT_ID

Replace PROJECT_ID with the ID of the project for which you want to view the quota.

Best practices

The following checklist summarizes the best practices for reducing insufficient concurrent operation limit errors:

What's next