Java 8 已停止支援,並將於 2026 年 1 月 31 日
淘汰。淘汰後,您將無法部署 Java 8 應用程式,即使貴機構先前使用機構政策重新啟用舊版執行階段的部署作業也一樣。現有的 Java 8 應用程式在
淘汰日期後,仍會繼續執行並接收流量。建議您
改用最新支援的 Java 版本。
排解 App Engine 錯誤
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本頁面說明使用 App Engine 時可能遇到的錯誤,以及如何排解這些錯誤。如要瞭解影響 Google Cloud服務的事件,請參閱 Google Cloud Service Health 資訊主頁和App Engine 回報的所有事件。
如要瞭解如何解決應用程式相關問題,請參閱下列頁面:
App Engine 疑難排解策略
下列各節說明如何套用一般疑難排解策略來解決錯誤。如果您按照疑難排解指南中的步驟操作後,仍持續遇到錯誤,請參閱「後續步驟」。
使用 Cloud Logging 輸出正常記錄檔
如果您有可用於偵錯的良好應用程式記錄,就能更輕鬆地排解在 App Engine 上執行的應用程式問題。請確認應用程式寫入記錄的方式將要求記錄與應用程式記錄建立關聯。
有了相關聯的記錄,您就能找出需要進一步分析的請求、找到請求追蹤記錄,並分析問題的根本原因。如要進一步瞭解如何寫入記錄,請參閱「寫入應用程式記錄」。
解決非預期的延遲時間
如果遇到延遲問題,請採取以下步驟:
請確認延遲時間是否會影響服務的所有要求,或是只影響一小部分要求。App Engine 延遲時間資訊主頁會顯示第 50、95 和 99 個百分位數的延遲時間。
如果這三項指標的延遲時間都很高,表示至少有 50% 的要求延遲時間偏高。如果只有第 99 個百分位數圖表顯示高延遲時間,表示 1% 的要求有高延遲時間。
找出延遲時間長的要求,瞭解延遲的來源。您可以使用 Cloud Trace 或 Cloud Logging,瞭解特定要求所需的時間。詳情請參閱「瞭解應用程式延遲」。
如要使用 Cloud Logging 找出延遲時間較長的要求,請套用 traceSampled=true
篩選器,將 Cloud Logging 中的記錄與 Cloud Trace 中的追蹤記錄建立關聯。詳情請參閱「與 Cloud Logging 整合」。
請嘗試下列步驟修正延遲問題,並改善服務效能:
如要進一步瞭解如何排解延遲時間過長的問題,請參閱「解決應用程式延遲時間過長的問題」。
解決連線問題
根據預設,App Engine 服務可透過公開網際網路存取,但您可以修改服務,進一步限制入站和出站網路連線。
您可以透過入口設定或 App Engine 防火牆規則限制入站連線。如果您無法從虛擬私人雲端網路或網際網路資源連線至 App Engine 服務,請檢查下列事項:
如要解決其他連線問題,請按照下列步驟操作:
如要進一步瞭解如何排解連線問題,請參閱「App Engine 連線策略」。
後續步驟
如果您在 App Engine 說明文件中找不到問題的解決方法,請按照下列步驟操作:
詳情請參閱 App Engine 社群。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-09-04 (世界標準時間)。
[[["容易理解","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 (世界標準時間)。"],[[["\u003cp\u003eThis page provides troubleshooting guidance for errors encountered while using App Engine, along with links to relevant Google Cloud health and incident reports.\u003c/p\u003e\n"],["\u003cp\u003eTroubleshooting guides are available for common issues such as deployment, serving, and elevated latency.\u003c/p\u003e\n"],["\u003cp\u003eEffective logging, including correlating request and application logs, is crucial for debugging App Engine applications.\u003c/p\u003e\n"],["\u003cp\u003eLatency issues can be diagnosed by examining request metrics and utilizing tools like Cloud Trace and Cloud Logging, and fixed by adjusting instance classes, warmup requests, scaling settings, or code modification.\u003c/p\u003e\n"],["\u003cp\u003eConnectivity problems can be resolved by reviewing ingress settings, firewall rules, running network tests, and managing VPC connector configurations.\u003c/p\u003e\n"]]],[],null,["# Troubleshoot App Engine errors\n\nThis page describes the troubleshooting process for errors you might encounter while\nusing App Engine. For information about incidents affecting Google Cloud\nservices, refer to the [Google Cloud Service Health Dashboard](https://status.cloud.google.com/summary) and [All incidents reported for App Engine](https://status.cloud.google.com/products/kchyUtnkMHJWaAva8aYc/history).\n\nSee the following pages for guidance on how to resolve issues related to your app:\n\n- [Troubleshoot deployment issues](/appengine/docs/standard/troubleshooter/deployment)\n- [Troubleshoot serving issues](/appengine/docs/standard/troubleshooter/serving)\n- [Troubleshoot elevated latency in your app](/appengine/docs/standard/troubleshooter/latency)\n- [App Engine connectivity strategies](/appengine/docs/standard/troubleshooter/connectivity)\n\nApp Engine 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\neven after following the steps in the troubleshooting guides, see [What's next](#whats-next).\n\n### Output good logs using Cloud Logging\n\nTroubleshooting your app running on App Engine is easier if you have good\napplication logs for debugging. Ensure your application writes logs in a way that\n[correlates request logs with the application logs](/appengine/docs/standard/writing-application-logs#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 application logs](/appengine/docs/standard/writing-application-logs#writing_app_logs).\n\n### Resolve unexpected latency\n\nIf you encounter issues with latency, do the following:\n\n1. Check if the latency is affecting all requests to your service or only a\n small percentage. The [App Engine latency dashboard](/appengine/docs/standard/monitoring-and-alerting-latency#checking_the_latency_dashboard) shows 50th,\n 95th, and 99th percentile latency.\n\n If you have high latency on all three of these metrics, you have high latency\n for at least 50% of your requests. If you only see high latency in the\n 99th percentile graph, you have high latency in 1% of your requests.\n2. Identify the request with high latency to understand the source of\n latency. You can use Cloud Trace or Cloud Logging to understand how\n long a particular request has taken. For more information, see [Understanding app latency](/appengine/docs/standard/monitoring-and-alerting-latency#understanding_app_latency).\n\n To identify requests with high latency using Cloud Logging, apply the `traceSampled=true` filter to correlate logs in Cloud Logging with traces in Cloud Trace. For more information, see [Integrate with Cloud Logging](/trace/docs/trace-log-integration).\n3. Try the following steps to fix latency issues, and improve service performance:\n\n - Increase the [instance class](/appengine/docs/standard#instance_classes) settings.\n\n - Reduce cold start latency by [configuring warmup requests](/appengine/docs/standard/configuring-warmup-requests).\n\n - Adjust [scaling settings](/appengine/docs/standard/how-instances-are-managed#scaling_dynamic_instances).\n\n \u003c!-- --\u003e\n\n - Consider using [Profiler](/appengine/docs/standard/cloud-profiler).\n\n - Modify your source code.\n\nFor more information on how to troubleshoot elevated latency issues, see [Troubleshoot elevated latency in your app](/appengine/docs/standard/troubleshooter/latency).\n\n### Resolve issues with connectivity\n\nBy default, your App Engine service is accessible on the public internet, however,\nyou can modify the service to have more restrictions on ingress and egress\nnetwork connectivity.\n\nYou can restrict ingress connections with the ingress settings, or through App Engine firewall rules. If you have trouble connecting to your App Engine service from\nVPC networks or internet resources, check the following:\n\n- [Ingress settings](/appengine/docs/standard/ingress-settings)\n- [App Engine firewall](/appengine/docs/standard/understanding-firewalls)\n\nTo resolve other connectivity issues, do the following:\n\n- Run a [network connectivity test](/network-intelligence-center/docs/connectivity-tests/how-to/running-connectivity-tests#console_6).\n\n- To resolve problems with traffic egress to a VPC network, check the VPC network\n firewall rules or use connection pooling in your client. For more information,\n see [Firewall rules](/vpc/docs/serverless-vpc-access#connector-fw-rules-standalone-vpc-or-host-prj).\n\n- Ensure that you aren't [overloading your VPC connector](/appengine/docs/standard/connecting-vpc#network-cpu) with more services and\n connections beyond its threshold. To improve throughput, consider the VPC connector\n size and instance count for your connectors. For more information, see\n [Serverless VPC Access](/vpc/docs/serverless-vpc-access#scaling).\n\n- For problems accessing VPC resources, review the [VPC connector throughput charts](/vpc/docs/serverless-vpc-access#throughput_chart).\n\nFor more information on how to troubleshoot connectivity issues, see\n[App Engine connectivity strategies](/appengine/docs/standard/troubleshooter/connectivity).\n\n### What's next\n\nIf you can't find a solution to your problem in the App Engine\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-app-engine), or search for similar issues using the `google-app-engine` tag.\n- Open bugs or feature requests by using the [public issue tracker](/support/docs/issue-trackers).\n\nFor more information, see [App Engine community](/appengine/docs/standard/community)."]]