Troubleshooting App Engine flexible deployment

This document presents troubleshooting techniques for Cloud Endpoints deployments in App Engine flexible environments. If you receive an error back from a request to your API, see Troubleshooting response errors for information on troubleshooting the error.

Deployment errors

This section describes how to troubleshoot errors from gcloud app deploy.

Error message Troubleshooting
Your deployment has failed to become healthy in the allotted time and therefore was rolled back. If you believe this was an error, try adjusting the app_start_timeout_sec setting in the readiness_check section.

Check that your app.yaml file has a readiness_check section with a value for app_start_timeout_sec. If it doesn't exist, add the section and set the value of app_start_timeout_sec to higher than the default of 300 seconds. For more information, see readiness checks.

Make sure that all the Google Cloud services that Endpoints and ESP require are enabled on your project. See Checking required services for details.

Error messages about rollout_strategy

When you configure app.yaml before deploying, you must add the endpoints_api_service section. The Extensible Service Proxy (ESP) needs the settings that you specify in this section to obtain the configuration for your service. You must specify either a configuration ID in the config_id field, or include the rollout_strategy: managed option, but not both. This option configures ESP to use the latest deployed service configuration. When you specify this option, up to 5 minutes after you deploy a new service configuration, ESP detects the change and automatically begins using it. We recommend that you specify this option instead of a specific configuration ID for ESP to use. For example:

  rollout_strategy: managed

If the endpoints_api_service section doesn't include the information that ESP needs to obtain a service configuration, one of the following messages is displayed:

Error message Troubleshooting
config_id is forbidden when rollout_strategy is set to "managed" You cannot specify both a configuration ID and rollout_strategy: managed. Unless you have a reason for using a specific configuration ID, we recommend that you remove the config_id: [YOUR_CONFIG_ID] from app.yaml and rerun gcloud app deploy.
config_id must be specified when rollout_strategy is unspecified or set to "fixed" This error message is displayed when either app.yaml doesn't include the rollout_strategy: managed or rollout_strategy is set to fixed and you haven't specified a configuration ID. Unless you have a reason for using a specific configuration ID, we recommend that you add rollout_strategy: managed to the endpoints_api_service section of app.yaml and rerun gcloud app deploy.

Viewing logs on an instance

App Engine crash and system logs provide information on why the application failed to launch or perform as intended. You can find further debugging information in the Endpoints log.

  1. In the Google Cloud console, SSH into your virtual machine. See connecting to an instance for more information.

  2. Use a text viewer such as tail:

     tail -f /var/log/nginx/error.log

What's next