Known issues in the App Engine flexible environment
Stay organized with collections
Save and categorize content based on your preferences.
Region ID
The REGION_ID is an abbreviated code that Google assigns
based on the region you select when you create your app. The code does not
correspond to a country or province, even though some region IDs may appear
similar to commonly used country and province codes. For apps created after
February 2020, REGION_ID.r is included in
App Engine URLs. For existing apps created before this date, the
region ID is optional in the URL.
For a full list of known issues or to report a new issue, see the
issue tracker.
After you deploy your application with gcloud app deploy, you
might need to wait 1-2 minutes before your application starts serving at
https://PROJECT_ID.REGION_ID.r.appspot.com. Until then, you might see HTTP 503 errors.
App Engine often logs these errors as backend_timeout or failed_to_pick_backend
in the global external Application Load Balancer logs. The global external Application Load Balancer sends requests to a
service in the App Engine flexible environment regardless of the health of individual instances.
After you deploy a new version, the global external Application Load Balancer takes time to
update its configuration with the new backend instances. During this
transition, the availability of backend services is inconsistent. When
migrating traffic to the new version, the global external Application Load Balancer might try to
send traffic to instances that aren't fully ready to receive requests, resulting
in 503 errors. This might also result in 502 errors, particularly when using a classic Application Load Balancer.
If there is an organization policy on your project that restricts access to
external IPs, you won't be able to deploy an App Engine flexible environment app with external
IP addresses. For example, the organization policy could look as follows:
The effective policy for constraints/compute.vmExternalIpAccess is set to
DENY_ALL.
The effective policy for constraints/compute.vmExternalIpAccess is set to
allow only specific VM instances.
The effective policy for constraints/compute.requireOsConfig is disabled for the project to prevent metadata updates.
These constraints are not automatically detected, and deployments might time
out and fail. You can check the organization policy for your project by
running the command gcloud beta resource-manager org-policies describe
compute.vmExternalIpAccess --project=my-project --effective.
You can also override the organizational policy for a specific project.
However, even with such organization policies set, you can deploy a private App Engine flexible environment app that uses only its internal IP address.
After you deploy a new version of an existing service in the App Engine flexible environment
with gcloud app deploy, the "Count/sec" metric shown
in the "Summary" graph of the App Engine dashboard may decrease
significantly. The metric will gradually return to the expected request
count over the next 5-10 minutes.
This does not mean that your application is serving fewer requests. When
you deploy a new version of your application, there is a delay between
the time the new version is ready to serve requests and the time that
the metrics for new instances become available.
To ensure that this metric is unaffected by a new version deployment:
If you deploy with --no-promote but allocate any amount of traffic to
the new version before the 15 minute window after the deployment completes,
this metric may be impacted.
It is not possible in the App Engine flexible environment to configure app.yaml so that
your app automatically redirects requests to always use HTTPS. This differs
from the App Engine standard environment, where you can use the secure setting.
If you assign a
user-managed service account
to an App Engine flexible environment version, your project may be billed for
agent.googleapis.com-prefixed metrics. Normally, these agent metrics are not
charged to your project. We recommend that you continue to use the App Engine
default service account until this issue
is resolved.
You can't establish an SSH connection to a VM Instance using IAP.
Unexpected reduction in number of instances
In rare events, your application could see an unexpected reduction in the
number of instances due to zone failures, or if an entire group of instances
stop responding. To prevent
this, Google recommends overprovisioning your application to prevent your
system from dropping below the minimum number of instances. You can set your
App Engine flexible environment application's
min_num_instances
size when deploying it. Some events that may affect App Engine flexible environment minimum
number of instances are:
Zonal failure (Stockout issues, such as when your region is at capacity
for your selected CPU, etc.)
App Engine flexible environment uses 3 zones to distribute your instances and in such a
configuration, we
recommend
provisioning 50% more instances than required.
Inconsistent Cloud Load Balancing metrics
The App Engine flexible environment dashboard displays all metrics only for requests routed
through a flexible environment-managed backend. If you use App Engine flexible environment with
Cloud Load Balancing, certain metrics in the App Engine
metrics table are reported as
metrics from the loadbalancing
table instead. For more information, see
HTTP(S) Load Balancing logging and monitoring.
InterruptedException in runtimes using JVM during health check failure
When a health check fails, the VM is shutdown. As a symptom of the app container
becoming unhealthy, the JVM responds with InterruptedException and
NullPointerException errors. A handler can respond to the SIGTERM signal
sent by the container during shutdown, to perform any necessary clean-up or
debugging actions, to prevent exceptions.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-29 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eREGION_ID\u003c/code\u003e is a Google-assigned code based on the region selected during app creation, not a country or province code, and it's included in App Engine URLs for apps created after February 2020.\u003c/p\u003e\n"],["\u003cp\u003eAfter deploying an application with \u003ccode\u003egcloud app deploy\u003c/code\u003e, there may be a 1-2 minute delay before it starts serving at the designated URL, during which HTTP \u003ccode\u003e503\u003c/code\u003e errors may occur.\u003c/p\u003e\n"],["\u003cp\u003eDeploying a new version of an App Engine flexible environment service may cause a temporary dip in the "Count/sec" metric on the dashboard, which will recover in 5-10 minutes, and using \u003ccode\u003egcloud app deploy --no-promote\u003c/code\u003e followed by a 15-minute wait can mitigate this.\u003c/p\u003e\n"],["\u003cp\u003eUnlike the standard environment, the App Engine flexible environment does not allow configuring \u003ccode\u003eapp.yaml\u003c/code\u003e to automatically redirect requests to HTTPS, but redirects can be managed within the application code using the \u003ccode\u003eX-Forwarded-Proto\u003c/code\u003e header.\u003c/p\u003e\n"],["\u003cp\u003eDue to potential billing issues, it is recommended to use the App Engine default service account instead of a user-managed service account for App Engine flexible environment versions until the related issue is resolved.\u003c/p\u003e\n"]]],[],null,["# Known issues in the App Engine flexible environment\n\n### Region ID\n\nThe \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e is an abbreviated code that Google assigns\nbased on the region you select when you create your app. The code does not\ncorrespond to a country or province, even though some region IDs may appear\nsimilar to commonly used country and province codes. For apps created after\nFebruary 2020, \u003cvar translate=\"no\"\u003eREGION_ID\u003c/var\u003e`.r` is included in\nApp Engine URLs. For existing apps created before this date, the\nregion ID is optional in the URL.\n\nLearn more\n[about region IDs](/appengine/docs/standard/python/how-requests-are-routed#region-id). \nOK\n\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nFor a full list of known issues or to report a new issue, see the\n[issue tracker](https://issuetracker.google.com/issues?q=componentid:187250%2B).\n\n- After you deploy your application with `gcloud app deploy`, you\n might need to wait 1-2 minutes before your application starts serving at\n\n `https://`\u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e`.`\u003cvar translate=\"no\"\u003e\u003ca href=\"#appengine-urls\" style=\"border-bottom: 1px dotted #999\" class=\"devsite-dialog-button\" data-modal-dialog-id=\"regional_url\" track-type=\"progressiveHelp\" track-name=\"modalHelp\" track-metadata-goal=\"regionalURL\"\u003eREGION_ID\u003c/a\u003e\u003c/var\u003e`.r.appspot.com`. Until then, you might see HTTP `503` errors.\n\n App Engine often logs these errors as `backend_timeout` or `failed_to_pick_backend`\n in the global external Application Load Balancer logs. The global external Application Load Balancer sends requests to a\n service in the App Engine flexible environment regardless of the health of individual instances.\n After you deploy a new version, the global external Application Load Balancer takes time to\n update its configuration with the new backend instances. During this\n transition, the availability of backend services is inconsistent. When\n migrating traffic to the new version, the global external Application Load Balancer might try to\n send traffic to instances that aren't fully ready to receive requests, resulting\n in `503` errors. This might also result in `502` errors, particularly when using a [classic Application Load Balancer](/load-balancing/docs/https/troubleshooting-ext-https-lbs).\n- If there is an organization policy on your project that restricts access to\n external IPs, you won't be able to deploy an App Engine flexible environment app with external\n IP addresses. For example, the organization policy could look as follows:\n\n - The effective policy for `constraints/compute.vmExternalIpAccess` is set to `DENY_ALL`.\n - The effective policy for `constraints/compute.vmExternalIpAccess` is set to allow only specific VM instances.\n - The effective policy for `constraints/compute.requireOsConfig` is disabled for the project to prevent metadata updates.\n\n These constraints are not automatically detected, and deployments might time\n out and fail. You can check the organization policy for your project by\n running the command `gcloud beta resource-manager org-policies describe\n compute.vmExternalIpAccess --project=my-project --effective`.\n You can also [override the organizational policy for a specific project](/resource-manager/docs/organization-policy/using-constraints#override_boolean_policy).\n\n However, even with such organization policies set, you can deploy a private App Engine flexible environment app that uses only its internal IP address.\n- After you deploy a new version of an existing service in the App Engine flexible environment\n with `gcloud app deploy`, the \"Count/sec\" metric shown\n in the \"Summary\" graph of the App Engine dashboard may decrease\n significantly. The metric will gradually return to the expected request\n count over the next 5-10 minutes.\n\n This does not mean that your application is serving fewer requests. When\n you deploy a new version of your application, there is a delay between\n the time the new version is ready to serve requests and the time that\n the metrics for new instances become available.\n\n To ensure that this metric is unaffected by a new version deployment:\n 1. Deploy your new version with [`gcloud app deploy --no-promote`](/sdk/gcloud/reference/app/deploy).\n 2. Wait 15 minutes after the deployment completes.\n 3. [Migrate traffic to the new version](/appengine/docs/standard/migrating-traffic#migrating_traffic_to_a_new_version).\n\n If you deploy with `--no-promote` but allocate any amount of traffic to\n the new version before the 15 minute window after the deployment completes,\n this metric may be impacted.\n- It is not possible in the App Engine flexible environment to configure `app.yaml` so that\n your app automatically redirects requests to always use HTTPS. This differs\n from the App Engine standard environment, where you can use the `secure` setting.\n\n As an alternative, you can handle the redirect inside your application\n code by parsing the value of\n [`X-Forwarded-Proto` header](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Proto).\n You can also encourage clients to use the\n [`Strict-Transport-Security` header](/appengine/docs/flexible/how-requests-are-handled#http_strict_transport_security).\n- If you assign a\n [user-managed service account](/appengine/docs/flexible/user-managed-service-accounts)\n to an App Engine flexible environment version, your project may be billed for\n `agent.googleapis.com`-prefixed metrics. Normally, these agent metrics are not\n charged to your project. We recommend that you continue to use the App Engine\n default service account until [this issue](https://issuetracker.google.com/issues/201321074)\n is resolved.\n\n- You can't establish an SSH connection to a VM Instance using IAP.\n\nUnexpected reduction in number of instances\n-------------------------------------------\n\n- In rare events, your application could see an unexpected reduction in the\n number of instances due to zone failures, or if an entire group of instances\n stop responding. To prevent\n this, Google recommends overprovisioning your application to prevent your\n system from dropping below the minimum number of instances. You can set your\n App Engine flexible environment application's\n [min_num_instances](/appengine/docs/flexible/reference/app-yaml#min_num_instances)\n size when deploying it. Some events that may affect App Engine flexible environment minimum\n number of instances are:\n\n 1. Rolling out [updates to flexible environment instances](/appengine/docs/flexible#features)\n 2. Zonal failure (Stockout issues, such as when your region is at capacity for your selected CPU, etc.)\n\n App Engine flexible environment uses 3 zones to distribute your instances and in such a\n configuration, we\n [recommend](/compute/docs/instance-groups/regional-migs#estimating_instance_group_size)\n provisioning 50% more instances than required.\n\nInconsistent Cloud Load Balancing metrics\n-----------------------------------------\n\nThe App Engine flexible environment dashboard displays all metrics only for requests routed\nthrough a flexible environment-managed backend. If you use App Engine flexible environment with\nCloud Load Balancing, certain metrics in the App Engine\n[metrics table](/monitoring/api/metrics_gcp_a_b#gcp-appengine) are reported as\nmetrics from the [`loadbalancing`](/monitoring/api/metrics_gcp_i_o#gcp-loadbalancing)\ntable instead. For more information, see\n[HTTP(S) Load Balancing logging and monitoring](/load-balancing/docs/https/https-logging-monitoring).\n\n`InterruptedException` in runtimes using JVM during health check failure\n------------------------------------------------------------------------\n\nWhen a health check fails, the VM is shutdown. As a symptom of the app container\nbecoming unhealthy, the JVM responds with `InterruptedException` and\n`NullPointerException` errors. A handler can [respond to the `SIGTERM` signal](/appengine/docs/flexible/custom-runtimes/build#application_shutdown)\nsent by the container during shutdown, to perform any necessary clean-up or\ndebugging actions, to prevent exceptions."]]