This page describes the troubleshooting process for errors you might encounter while using App Engine. For information about incidents affecting Google Cloud services, refer to the Google Cloud Service Health Dashboard and All incidents reported for App Engine.
See the following pages for guidance on how to resolve issues related to your app:
- Troubleshoot deployment issues
- Troubleshoot serving issues
- Troubleshoot elevated latency in your app
- App Engine connectivity strategies
App Engine troubleshooting strategies
The following sections explain how you can apply general troubleshooting strategies to resolve your error. If you continue to encounter errors even after following the steps in the troubleshooting guides, contact support.
Output good logs using Cloud Logging
Troubleshooting your app running on App Engine is easier if you have good application logs for debugging. Ensure your application writes logs in a way that correlates request logs with the application logs.
With correlated logs you can identify the request that needs further analysis, find the request trace, and analyze the root cause of the issue. For more information on writing logs, see Write application logs.
Resolve unexpected latency
If you encounter issues with latency, do the following:
Check if the latency is affecting all requests to your service or only a small percentage. The App Engine latency dashboard shows 50th, 95th, and 99th percentile latency.
If you have high latency on all three of these metrics, you have high latency for at least 50% of your requests. If you only see high latency in the 99th percentile graph, you have high latency in 1% of your requests.
Identify the request with high latency to understand the source of latency. You can use Cloud Trace or Cloud Logging to understand how long a particular request has taken. For more information, see Understanding app latency.
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.Try the following steps to fix latency issues, and improve service performance:
Adjust your CPU, memory, and disk resources.
Adjust scaling settings.
Consider using Profiler.
Modify your source code.
For more information on how to troubleshoot elevated latency issues, see Troubleshoot elevated latency in your app.
Resolve issues with connectivity
By default, your App Engine service is accessible on the public internet, however, you can modify the service to have more restrictions on ingress and egress network connectivity.
You 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 VPC networks or internet resources, check the following:
To resolve other connectivity issues, do the following:
Set an instance into debug mode, and SSH to the instance while it continues to take live traffic. After connecting to the instance, you can debug the instance using common command line tools.
Check the firewall rules on your VPC network to make sure traffic isn't blocked.
Check if you have disabled the external IP.
For more information on how to troubleshoot connectivity issues, see App Engine connectivity strategies.