Fehlerbehebung bei Kontingenten für gleichzeitige Vorgänge in der Compute Engine
Mit Sammlungen den Überblick behalten
Sie können Inhalte basierend auf Ihren Einstellungen speichern und kategorisieren.
In diesem Dokument wird beschrieben, wie Sie Probleme mit Limits für gleichzeitige Vorgänge in Compute Engine beheben, die durch rateLimitExceeded-Fehler verursacht werden.
Mit den folgenden Schritten zur Fehlerbehebung können Sie die Ursache eines rateLimitExceeded-Fehlers ermitteln:
Rufen Sie in der Google Cloud Console die Seite Log-Explorer auf:
METHOD_NAME: Der Name der Dienstmethode oder des Vorgangs. Bei API-Aufrufen ist dies der Name der API-Methode.
LOCATION: Der Standort der Ressource. Dies kann eine Region, Zone oder global sein. Die Einträge currentLocations: "us-central1"(Regional) oder currentLocations: "us-central1-a" geben beispielsweise an, dass die Region "us-central1" oder currentLocations: "global" ist.
Ermitteln Sie den zugehörigen methodName-Wert aus dem Fehlerlog. Dieser Name steht für die API-Methode, für die das Ratenlimit überschritten wurde, z. B. v1.compute.instances.stop.
Suchen Sie in den Audit-Logs nach dem relevanten Ort.
Prüfen Sie die Concurrent operations per project-Kontingente und ‑Limits.
Console
Rufen Sie in der Google Cloud Console die Seite Kontingente auf.
Auf der Seite Kontingente sind die Kontingentnutzung und die Kontingentlimits für Ihr Projekt aufgeführt.
Standardmäßig werden die am häufigsten verwendeten Kontingente in der Liste sortiert. So können Sie leicht feststellen, bei welchen Limits die Gefahr besteht, dass sie überschritten werden.
Wenn Sie die Liste filtern und die Nutzung und das Limit für ein bestimmtes Kontingent aufrufen möchten, wählen Sie im Feld Filter die Option Kontingent oder Messwert aus.
Wählen Sie beispielsweise entweder das Kontingent mit dem Namen Concurrent global operations per project operation type oder Service: Compute Engine API, type: System Limit und ein Schlüsselwort concurrent aus, um alle Kontingente für gleichzeitige Vorgänge aufzulisten. Beim Filtern wird eine Liste der gleichzeitigen Kontingente angezeigt. In dieser Liste können Sie nach dem betroffenen Kontingent suchen.
Wenn Sie das Kontingent für einen bestimmten Vorgang filtern möchten, fügen Sie der Filterabfrage Dimensions hinzu und wählen Sie operation_type aus (in den Audit-Logs als methodName angezeigt).
Wählen Sie beispielsweise instances_stop aus, um die Kontingentnutzung und das Limit für den Vorgang instances.stop aufzurufen.
Wenn Sie das Kontingent für eine bestimmte Region filtern möchten, fügen Sie der Filterabfrage Dimensionen hinzu und wählen Sie die Region aus (in den Audit-Logs als currentLocations angezeigt).
Wählen Sie beispielsweise us-central1 aus, um die Kontingentnutzung und das Limit für die Region us-central1 aufzurufen.
Die Filter region und operation_type können zusammen verwendet werden, um die Kontingentnutzung und das Limit für einen bestimmten Vorgang in einer bestimmten Region aufzurufen.
gcloud
Mit der Google Cloud CLI können Sie die Nutzung und das Limit von Kontingenten für gleichzeitige Vorgänge aufrufen.
Für diesen Ansatz müssen Sie die Komponente Alphabefehle installiert haben. Wenn Sie Cloud Shell für die Interaktion mit Google Cloudverwenden, wird das Google Cloud CLI für Sie installiert.
Verwenden Sie den folgenden Befehl, um ein Vorgangskontingent aufzurufen:
gcloud alpha services quota list \
--service=compute.googleapis.com \
--consumer=projects/PROJECT_ID
Ersetzen Sie PROJECT_ID durch die ID des Projekts, für das Sie das Kontingent aufrufen möchten.
Diese Kontingente werden in der Regel in zwei Kategorien unterteilt:
Sehen Sie sich das Nutzungsdiagramm für das Kontingent an. Wenn die Nutzung während des Zeitraums der Fehlerlogs nahe am oder über dem Kontingentlimit liegt, bedeutet das, dass das Kontingent- oder Systemlimit überschritten wurde.
Wenn Sie Diagramme mit der aktuellen und der Spitzennutzung aufrufen möchten, rufen Sie das Kontingent auf und klicken Sie dann auf monitoringMonitoring.
Möglicherweise müssen Sie ganz nach rechts scrollen.
Im Monitoring-Diagramm wird die Ursache des rateLimitExceeded-Fehlers mit dem spezifischen Kontingent/Limit bestätigt. Wenn die aktuellen Werte über den Grenzwerten liegen, bedeutet das, dass das Systemlimit überschritten wurde.
Da Systemlimits nicht geändert werden können, empfehlen wir die folgenden Best Practices, um die Anzahl der gleichzeitigen Vorgänge zu reduzieren.
[[["Leicht verständlich","easyToUnderstand","thumb-up"],["Mein Problem wurde gelöst","solvedMyProblem","thumb-up"],["Sonstiges","otherUp","thumb-up"]],[["Schwer verständlich","hardToUnderstand","thumb-down"],["Informationen oder Beispielcode falsch","incorrectInformationOrSampleCode","thumb-down"],["Benötigte Informationen/Beispiele nicht gefunden","missingTheInformationSamplesINeed","thumb-down"],["Problem mit der Übersetzung","translationIssue","thumb-down"],["Sonstiges","otherDown","thumb-down"]],["Zuletzt aktualisiert: 2025-08-19 (UTC)."],[[["\u003cp\u003eThis document guides you through troubleshooting \u003ccode\u003erateLimitExceeded\u003c/code\u003e errors in Compute Engine, which indicate concurrent operation limit issues.\u003c/p\u003e\n"],["\u003cp\u003eTo find the cause, use the Logs Explorer to filter Compute Engine API error logs using a specific query that looks for \u003ccode\u003erateLimitExceeded\u003c/code\u003e messages, service names, and error codes.\u003c/p\u003e\n"],["\u003cp\u003eThe error logs provide details like the \u003ccode\u003emethodName\u003c/code\u003e of the affected API call and the \u003ccode\u003eLOCATION\u003c/code\u003e of the resource, which can then be used to determine the specific quota being exceeded.\u003c/p\u003e\n"],["\u003cp\u003eThe Quotas page in the Google Cloud console, or the gcloud CLI, can be used to check concurrent operation quotas per project, per project per operation type, or by specific regions to see if current usage is nearing or exceeding set limits.\u003c/p\u003e\n"],["\u003cp\u003eTo avoid future \u003ccode\u003erateLimitExceeded\u003c/code\u003e errors, best practices include waiting for operations to complete, relying on error codes, minimizing retries, using client-side rate limiters, and splitting applications across multiple projects.\u003c/p\u003e\n"]]],[],null,["*** ** * ** ***\n\nThis document describes how to troubleshoot concurrent operation limits in Compute Engine that are caused by [`rateLimitExceeded`](https://cloud.google.com/compute/operations-quota) errors.\n\nTo help identify the cause of a `rateLimitExceeded` error, use the following troubleshooting steps:\n\n1. In the Google Cloud console, go to the **Logs Explorer** page:\n\n [Go to **Logs Explorer**](https://console.cloud.google.com/logs/query)\n\n \u003cbr /\u003e\n\n If you use the search bar to find this page, then select the result whose subheading is\n **Logging**.\n2. To filter the error logs generated by Compute Engine API, enter the following logging query in the query editor.\n\n ```\n log_id(\"cloudaudit.googleapis.com/activity\")\n protoPayload.serviceName=\"compute.googleapis.com\"\n protoPayload.response.error.code=403\n protoPayload.status.message=\"Rate Limit Exceeded\"\n ```\n\n The filtered error logs should look similar to the following: \n\n ```\n \"protoPayload\":{\n \"@type\": \"type.googleapis.com/google.cloud.audit.AuditLog\",\n \"status\": {\n \"message\": \"Rate Limit Exceeded\"\n }\n \"serviceName\": \"compute.googleapis.com\",\n \"methodName\": \"METHOD_NAME\",\n ...\n ...\n \"response\": {\n \"error\": {\n \"message\": \"Rate Limit Exceeded\",\n \"code\": 403,\n \"errors\": [\n {\n \"message\": \"Rate Limit Exceeded\",\n \"reason\": \"rateLimitExceeded\",\n \"domain\": \"usageLimits\"\n }\n ]\n },\n \"@type\": \"type.googleapis.com/error\"\n },\n \"resourceLocation\": {\n \"currentLocations\": [\n \"LOCATION\"\n ]\n },\n ...\n ... \n ```\n\n The error details contain the following values:\n - \u003cvar translate=\"no\"\u003eMETHOD_NAME\u003c/var\u003e: The name of the service method or operation. For API calls, this name should be the name of the API method.\n\n - \u003cvar translate=\"no\"\u003eLOCATION\u003c/var\u003e: The location of the resource. This can be a region, zone or global. For example, the entries `currentLocations: \"us-central1\"`(Regional) or `currentLocations: \"us-central1-a\"` indicate that the region is `\"us-central1\"` or `currentLocations: \"global\"`.\n\n3. Identify the associated `methodName` value from the error log. This name represents the API method for which the rate limit exceeded, for example: `v1.compute.instances.stop`.\n\n4. Identify the relevant location in the audit logs.\n\n5. Check the `Concurrent operations per project` quotas and limits.\n\n Console\n 1. In the Google Cloud console, go to the **Quotas** page.\n\n [Go to Quotas](https://console.cloud.google.com/iam-admin/quotas)\n\n The **Quotas** page lists the quota usage and limits for your project.\n By default, the list is sorted to show your most used quotas first,\n which helps you see limits that are at risk of being exceeded.\n 2. To filter the list and to view the usage and limit for any specific quota,\n select **Quota** or **Metric** in the **Filter** field.\n\n For example, either select the Quota by the name `Concurrent global operations per project operation type` or\n select `Service: Compute Engine API`, `type: System Limit` and a key word `concurrent` to list all the concurrent operation quotas. Filtering provides a list of concurrent quotas. From this list, you can search for the affected quota.\n To filter the quota for a specific operation, add **Dimensions** to the filter query\n and select the **operation_type** (shown as **methodName** in the audit logs).\n\n For example, select `instances_stop`\n to see the quota usage and limit for the operation `instances.stop`.\n\n To filter the quota for a specific region, add **Dimensions** to the filter query\n and select the **region** (shown as **currentLocations** in the audit logs).\n\n For example, select `us-central1` to see the quota usage and limit for `us-central1` region.\n\n Filters **region** and **operation_type** can be used together to view the quota usage and limit for a specific operation in a specific region.\n\n gcloud\n\n\n | **Preview**\n |\n |\n | This product or feature is subject to the \"Pre-GA Offerings Terms\" in the General Service Terms section\n | of the [Service Specific Terms](/terms/service-terms#1).\n |\n | Pre-GA products and features are available \"as is\" and might have limited support.\n |\n | For more information, see the\n | [launch stage descriptions](/products#product-launch-stages).\n\n \u003cbr /\u003e\n\n You can use the Google Cloud CLI to view the usage and limit of concurrent\n operation quotas.\n\n To use this approach, ensure that you have installed\n the [alpha commands](/sdk/docs/components#alpha_and_beta_components)\n component. If you're using Cloud Shell to interact with Google Cloud, the\n Google Cloud CLI is installed for you.\n\n To view an operation quota, use the following command: \n\n ```\n gcloud alpha services quota list \\\n --service=compute.googleapis.com \\\n --consumer=projects/PROJECT_ID\n ```\n\n Replace \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e with the ID of the project for which you\n want to view the quota.\n\n These quotas are generally grouped into two categories:\n - Global or regional\n - Per project or per project per operation type\n\n For more information, see [Concurrent operation quota groups](https://cloud.google.com/compute/operations-quota#operation_groups).\n6. Check the usage chart for the quota. If the usage is close to or above the quota limit during the period of error logs, it means that the quota or system limit is exceeded.\n\n To view charts that show current and peak usage, go to the quota and then\n click monitoring **Monitoring**.\n You might need to scroll right to the end of the table.\n\n The monitoring graph will confirm the cause of `rateLimitExceeded` error, with the specific quota/limit. If the current values are above the limit values, it means that the system limit is exceeded.\n Since system limits can't be modified, we recommend the following best practices to reduce the number of concurrent operations.\n\n Some of the best practices are as follows:\n - [Wait for operations to be done](/compute/docs/api/best-practices#wait-for-operations)\n - [Rely on error codes, not error messages](/compute/docs/api/best-practices#rely-on-errors-not-messages)\n - [Minimize client-side retries to preserve API rate limits](/compute/docs/api/best-practices#preserve-API-rate-limits)\n\n Any of the following methods can be used to minimize retries:\n - [Avoid short polling](/compute/docs/api/best-practices#avoid-short-polling)\n - [Use bursting sparingly and selectively](/compute/docs/api/best-practices#limit-bursting)\n - [Always make your calls in a retry loop with exponential backoff](/compute/docs/api/best-practices#retry-with-exponential-backoff)\n - [Use a client-side rate limiter](/compute/docs/api/best-practices#use-client-side-rate-limiter)\n - [Split up your applications across multiple projects](/compute/docs/api/best-practices#multiple-projects)"]]