次の表に、Cloud Run で Gemini Cloud Assist を使用するためのプロンプトの例を示します。
プロンプト
回答の種類
「Cloud Run コンテナログに表示されているこのエラー メッセージを説明して。」
プロンプトに特定のエラー メッセージが含まれていない場合、出力には Cloud Run コンテナログの一般的なエラー メッセージに関するトラブルシューティングのガイダンスが含まれます。
「Cloud Run サービスのログに表示されているこのエラー メッセージを説明して。」
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-07-14 UTC。"],[],[],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)."]]