Go 1.11 已达到支持终止期限,将于 2026 年 1 月 31 日
弃用。弃用后,您将无法部署 Go 1.11 应用,即使您的组织之前曾使用组织政策重新启用旧版运行时的部署也是如此。现有的 Go 1.11 应用在
弃用日期之后将继续运行并接收流量。我们建议您
迁移到最新支持的 Go 版本。
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 防火墙规则来限制入站连接。如果您在通过 VPC 网络或互联网资源连接到 App Engine 服务时遇到问题,请检查以下各项:
如需解决其他连接问题,请执行以下操作:
如需详细了解如何排查连接问题,请参阅 App Engine 连接策略。
后续步骤
如果您在 App Engine 文档中找不到问题的解决方案,请按照以下步骤操作:
如需了解详情,请参阅 App Engine 社区。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-20。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["很难理解","hardToUnderstand","thumb-down"],["信息或示例代码不正确","incorrectInformationOrSampleCode","thumb-down"],["没有我需要的信息/示例","missingTheInformationSamplesINeed","thumb-down"],["翻译问题","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2025-08-20。"],[[["\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)."]]