如果提示中沒有特定錯誤訊息,輸出內容會提供常見 Cloud Run 容器記錄錯誤訊息的疑難排解指引。
「Can you explain this error message I'm seeing in my logs for my Cloud Run service?
HTTP 429 The request was aborted because there was no available instance. The Cloud Run service might have reached its maximum container instance limit or the service was otherwise not able to scale to incoming requests. This might be caused by a sudden increase in traffic, a long container startup time or a long request processing time."
說明 Cloud Run 錯誤訊息,以及如何解決錯誤。
「部署 Cloud Run 服務時,如何修正下列錯誤訊息?」
HTTP 404: Not found
錯誤的常見原因和疑難排解方式。
「我的 Cloud Run 服務一直停止運作。請問可能原因為何?」
調查原因和解決問題的方法。
「如何判斷記錄中出現的 5XX 錯誤是否是由於 Google 基礎架構服務中斷所致?」
判斷 5XX 錯誤原因的步驟。
「如何找出『com.google.apps.framework.request.BadRequestException Project PROJECT has serving status SYSTEM_DISABLED and cannot be modified』錯誤的原因?」
這表示專案已在系統層級遭到管理員停用。 Google Cloud 提供步驟,進一步調查原因。
「如果我已設定 ingress=internal,為什麼還是能透過瀏覽器存取 Cloud Run 服務?」
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Introduction to Cloud Run troubleshooting\n\nThis page describes the common troubleshooting strategies for Cloud Run\nerrors. [Personalized Service Health](/service-health/docs/overview) publishes\nall Cloud Run incidents that stem from the\nunderlying Google Cloud infrastructure to identify Google Cloud service disruptions\nimpacting your projects. You should also consider [setting up alerts on Personalized Service Health events](/service-health/docs/configure-alerts-dashboard). For information\nabout incidents affecting all Google Cloud services, see the [Google Cloud Service Health](https://status.cloud.google.com/summary) dashboard.\n\nSee the following sections in the [Cloud Run troubleshooting guide](/run/docs/troubleshooting) for resolving issues related to your Cloud Run resource:\n\n- [Deployment errors](/run/docs/troubleshooting#deployment)\n- [Serving errors](/run/docs/troubleshooting#serving)\n- [Connectivity and security errors](/run/docs/troubleshooting#connectivity)\n\nCloud Run troubleshooting strategies\n------------------------------------\n\nThe following sections explain how you can apply general troubleshooting\nstrategies to resolve your error. If you continue to encounter errors even after\nfollowing the steps in the [troubleshooting](/run/docs/troubleshooting) guide,\nsee [What's next](#next-steps).\n\n### Output good logs using Cloud Logging\n\nTroubleshooting your Cloud Run resource is easier if you have good logs for debugging. You should write logs in a way that\n[correlates your container logs with a request log](/run/docs/logging#correlate-logs).\n\nWith correlated logs, you can identify the request that needs further analysis,\nfind the request trace, and analyze the root cause of the issue. For more\ninformation on writing logs, see [Write container logs](/run/docs/logging#container-logs).\n\n### Investigate instances using the Logs Explorer\n\nEach request log in Cloud Run contains an [`instanceId`](/run/docs/logging#service-fields) field that identifies an instance that handles your\nrequest. Depending on the [concurrency value](/run/docs/about-concurrency) you\nspecify, a single instance can handle multiple requests at the same time.\n\nWhen you have multiple instances emitting logs at once, you should filter your\ninstances to identify the sequential requests that lead up to an instance crash.\n\nFiltering an instance lets you debug specific performance issues related\nto cold starts or increased latencies. These issues could also be bound to\nvariables declared in a global scope, when the value is reused in subsequent\nconcurrent requests. An example of this is when you create a single connection\npool global object for the instance, and then use it within multiple requests.\n\nTo filter a specific instance in the Logs Explorer, follow these 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)\n2. Select an existing Google Cloud project at the top of the page, or create a\n new project.\n\n3. Select the resource **Cloud Run Revision** for a service, or\n **Cloud Run Job** for a job.\n\n4. Expand a log entry to filter by a specific instance.\n\n5. Click the instance ID value, and select **Show matching entries**.\n\nWhile you investigate instances, you can [use Gemini Cloud Assist Investigations](#use-investigations) to gain additional insights into your logs.\nFor more information about different ways to initiate an\ninvestigation by using the Logs Explorer, see\n[Troubleshoot issues with Gemini Cloud Assist Investigations](/gemini/docs/cloud-assist/investigations#entry-points) in the Gemini documentation.\n\n### Resolve unexpected request latencies\n\nIf you encounter issues with latency, do the following:\n\n1. Check if the latency is affecting all requests to your Cloud Run\n resource or only a small percentage. Cloud Run is automatically integrated with Cloud Monitoring **with no setup or configuration required.**\n\n To see individual request latency metrics, follow these steps:\n 1. In the Google Cloud console, go to the Cloud Run page:\n\n [Go to Cloud Run](https://console.cloud.google.com/run)\n 2. Select the service or jobs from the list.\n\n 3. Click the **METRICS** tab to show the **Request latencies** dashboard.\n\n To [view latency metrics in Cloud Monitoring](/run/docs/monitoring#view-metrics-cloud-monitoring), select from the **Metrics** list,\n **Cloud Run Revision \\\u003e Request_latencies \\\u003e Request latency**.\n\n For a list of all available Cloud Run metrics and more in-depth\n details, see [Google Cloud metrics](/monitoring/api/metrics_gcp_p_z#gcp-run) in Cloud Monitoring.\n2. Identify the request with high latency to understand the source of latency.\n You can use Cloud Trace or Cloud Logging to understand how long a\n particular request has taken.\n\n To identify requests with high latency using Cloud Logging, apply the `traceSampled=true` filter to correlate logs in Cloud Logging with traces\n in Cloud Trace. For more information, see [Integrate with Cloud Logging](/trace/docs/trace-log-integration).\n\n Sometimes dependencies such as requests to other services might cause latency\n issues. To identify such requests, you should have explicit logging targeting\n the requests. If you don't output such logs, it could appear as a latency\n issue originating from a Cloud Run service.\n\n Additionally, you should consider evaluating latency spikes in the context of\n the chosen time window. A spike's significance is relative; a large spike\n in a small window might be negligible in a larger window, and vice-versa.\n Therefore, the time window significantly impacts the interpretation of\n latency data.\n3. Try increasing the number of [minimum instances](/run/docs/configuring/min-instances#setting-service-level) to reduce latency for incoming requests,\n and avoid cold starts. You should also consider modifying your source code,\n and [adjust the scaling settings](/run/docs/configuring/max-instances) to\n limit the number of connections to a backing service.\n\n For more information, see [Optimizing performance](/run/docs/tips/general#optimize_performance).\n\n### Troubleshoot with Gemini assistance\n\n\u003cbr /\u003e\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\nYou can use [Gemini Cloud Assist](/gemini/docs/cloud-assist/overview)\nchat to analyze logs and troubleshoot errors. With Gemini assistance, you\ncan quickly pinpoint and resolve errors by leveraging the tool's log analysis\ncapabilities, saving valuable time and effort.\n\nTo use Gemini Cloud Assist from the Google Cloud console, do\nthe following:\n\n1. [Ensure that Gemini Cloud Assist is set up for your Google Cloud user account and project](/gemini/docs/cloud-assist/set-up-gemini).\n\n2. [Set up your Cloud Run development environment](/run/docs/setup)\n in your Google Cloud project and ensure you have the appropriate\n [deployment permissions](/run/docs/reference/iam/roles#additional-configuration).\n\n3. Go to the Cloud Run page in the Google Cloud console.\n\n [Go to Cloud Run](https://console.cloud.google.com/run)\n4. In the console toolbar, select a Google Cloud project. Use a project\n associated with a project ID you submitted after you were granted access to\n Gemini Cloud Assist.\n\n5. Click spark\n **Open or close Gemini AI chat**.\n\n The Gemini panel opens.\n6. If necessary, click **Accept** if you agree to the terms.\n\n7. If you have a question about a specific application, provide context by\n going to the page that shows your resource before asking your question. When\n generating a response, Gemini includes information about the\n current console page and project.\n\n8. Enter a prompt in the **Gemini** panel.\n\n The following table provide some example prompts for using\n Gemini Cloud Assist with Cloud Run.\n\nFor more details, see the following resources:\n\n- Learn how to [write better prompts](/gemini/docs/discover/write-prompts).\n- Learn how to use the [Gemini Cloud Assist panel](/gemini/docs/cloud-assist-panel).\n- Read [Use Gemini for AI assistance and development](/gemini/docs/overview).\n- Learn [how Gemini for Google Cloud uses your data](/gemini/docs/discover/data-governance).\n\n### Use Gemini Cloud Assist Investigations\n\nIn addition to interactive chat, Gemini Cloud Assist can perform more\nautomated, in-depth analysis through Gemini Cloud Assist\nInvestigations. This feature is integrated directly into workflows like\nLogs Explorer, and is a powerful root-cause analysis tool.\n\nWhen you initiate an investigation from an error or a specific resource,\nGemini Cloud Assist analyzes logs, configurations, and metrics.\nIt uses this data to produce ranked observations and hypotheses about probable\nroot causes, and then provides you with recommended next steps. You can also\ntransfer these results to a Google Cloud support case to provide valuable\ncontext that can help you resolve your issue faster.\n\nFor more information about different ways to initiate an\ninvestigation, see\n[Troubleshoot issues with Gemini Cloud Assist Investigations](/gemini/docs/cloud-assist/investigations#entry-points) in the Gemini documentation.\n\n### What's next\n\nIf you can't find a solution to your problem in the Cloud Run\ndocumentation, follow these steps:\n\n- Open a support case by contacting [Cloud Customer Care](/support-hub).\n- Get support from the community by [asking questions on StackOverflow](https://stackoverflow.com/questions/tagged/google-cloud-run), or search for similar issues using the `google-cloud-run` tag.\n- Open bugs or feature requests by using the [public issue tracker](/support/docs/issue-trackers)."]]