<br />

<br />


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](https://status.cloud.google.com/summary) and [All incidents reported for App Engine](https://status.cloud.google.com/products/kchyUtnkMHJWaAva8aYc/history).

See the following pages for guidance on how to resolve issues related to your app:

- [Troubleshoot deployment issues](https://docs.cloud.google.com/appengine/docs/standard/troubleshooter/deployment)
- [Troubleshoot serving issues](https://docs.cloud.google.com/appengine/docs/standard/troubleshooter/serving)
- [Troubleshoot elevated latency in your app](https://docs.cloud.google.com/appengine/docs/standard/troubleshooter/latency)
- [App Engine connectivity strategies](https://docs.cloud.google.com/appengine/docs/standard/troubleshooter/connectivity)

## 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, see [What's next](https://docs.cloud.google.com/appengine/docs/standard/troubleshooting#whats-next).

### 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](https://docs.cloud.google.com/appengine/docs/standard/writing-application-logs#correlate_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](https://docs.cloud.google.com/appengine/docs/standard/writing-application-logs#writing_app_logs).

### Resolve unexpected latency

If you encounter issues with latency, do the following:

1. Check if the latency is affecting all requests to your service or only a
   small percentage. The [App Engine latency dashboard](https://docs.cloud.google.com/appengine/docs/standard/monitoring-and-alerting-latency#checking_the_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.
2. 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](https://docs.cloud.google.com/appengine/docs/standard/monitoring-and-alerting-latency#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](https://docs.cloud.google.com/trace/docs/trace-log-integration).
3. Try the following steps to fix latency issues, and improve service performance:

   - Increase the [instance class](https://docs.cloud.google.com/appengine/docs/standard#instance_classes) settings.

   - Reduce cold start latency by [configuring warmup requests](https://docs.cloud.google.com/appengine/docs/standard/configuring-warmup-requests).

   - Adjust [scaling settings](https://docs.cloud.google.com/appengine/docs/standard/how-instances-are-managed#scaling_dynamic_instances).

   <!-- -->

   - Consider using [Profiler](https://docs.cloud.google.com/appengine/docs/standard/cloud-profiler).

   - Modify your source code.

For more information on how to troubleshoot elevated latency issues, see [Troubleshoot elevated latency in your app](https://docs.cloud.google.com/appengine/docs/standard/troubleshooter/latency).

### 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:

- [Ingress settings](https://docs.cloud.google.com/appengine/docs/standard/ingress-settings)
- [App Engine firewall](https://docs.cloud.google.com/appengine/docs/standard/understanding-firewalls)

To resolve other connectivity issues, do the following:

- Run a [network connectivity test](https://docs.cloud.google.com/network-intelligence-center/docs/connectivity-tests/how-to/running-connectivity-tests#console_6).

- To resolve problems with traffic egress to a VPC network, check the VPC network
  firewall rules or use connection pooling in your client. For more information,
  see [Firewall rules](https://docs.cloud.google.com/vpc/docs/serverless-vpc-access#connector-fw-rules-standalone-vpc-or-host-prj).

- Ensure that you aren't [overloading your VPC connector](https://docs.cloud.google.com/appengine/docs/standard/connecting-vpc#network-cpu) with more services and
  connections beyond its threshold. To improve throughput, consider the VPC connector
  size and instance count for your connectors. For more information, see
  [Serverless VPC Access](https://docs.cloud.google.com/vpc/docs/serverless-vpc-access#scaling).

- For problems accessing VPC resources, review the [VPC connector throughput charts](https://docs.cloud.google.com/vpc/docs/serverless-vpc-access#throughput_chart).

For more information on how to troubleshoot connectivity issues, see
[App Engine connectivity strategies](https://docs.cloud.google.com/appengine/docs/standard/troubleshooter/connectivity).

### What's next

If you can't find a solution to your problem in the App Engine
documentation, follow these steps:

- Open a support case by contacting [Cloud Customer Care](https://cloud.google.com/support-hub).
- 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.
- Open bugs or feature requests by using the [public issue tracker](https://docs.cloud.google.com/support/docs/issue-trackers).

For more information, see [App Engine community](https://docs.cloud.google.com/appengine/docs/standard/community).