Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
ID region
REGION_ID adalah kode singkat yang ditetapkan Google berdasarkan region yang Anda pilih saat membuat aplikasi. Kode ini tidak sesuai dengan negara atau provinsi, meskipun beberapa ID region mungkin tampak mirip dengan kode negara dan provinsi yang umum digunakan. Untuk aplikasi yang dibuat setelah Februari 2020, REGION_ID.r disertakan dalam URL App Engine. Untuk aplikasi lama yang dibuat sebelum tanggal tersebut, ID region bersifat opsional dalam URL.
Untuk mengetahui daftar lengkap masalah umum atau melaporkan masalah baru, lihat
issue tracker.
Setelah men-deploy aplikasi Anda dengan gcloud app deploy, Anda
mungkin harus menunggu 1-2 menit sebelum aplikasi mulai ditayangkan di
https://PROJECT_ID.REGION_ID.r.appspot.com. Sebelum proses tersebut selesai, Anda mungkin melihat error 503 HTTP.
App Engine sering kali mencatat error ini sebagai backend_timeout atau failed_to_pick_backend dalam log Load Balancer Aplikasi eksternal global. Load Balancer Aplikasi eksternal global mengirimkan permintaan ke
layanan di lingkungan fleksibel App Engine, terlepas dari kondisi setiap instance.
Setelah Anda men-deploy versi baru, Load Balancer Aplikasi eksternal global memerlukan waktu untuk
memperbarui konfigurasinya dengan instance backend baru. Selama transisi ini, ketersediaan layanan backend tidak konsisten. Saat
memigrasikan traffic ke versi baru, Load Balancer Aplikasi eksternal global mungkin mencoba
mengirim traffic ke instance yang belum sepenuhnya siap menerima permintaan, sehingga
menghasilkan error 503. Hal ini juga dapat menyebabkan error 502, terutama saat menggunakan Load Balancer Aplikasi klasik.
Jika ada kebijakan organisasi di project Anda yang membatasi akses ke IP eksternal, Anda tidak akan dapat men-deploy aplikasi lingkungan fleksibel App Engine dengan alamat IP eksternal. Misalnya, kebijakan organisasi dapat terlihat seperti berikut:
Kebijakan yang berlaku untuk constraints/compute.vmExternalIpAccess ditetapkan ke DENY_ALL.
Kebijakan yang efektif untuk constraints/compute.vmExternalIpAccess ditetapkan untuk hanya mengizinkan instance VM tertentu.
Kebijakan yang berlaku untuk constraints/compute.requireOsConfig dinonaktifkan untuk project guna mencegah update metadata.
Batasan ini tidak terdeteksi secara otomatis, dan deployment dapat mengalami waktu habis dan gagal. Anda dapat memeriksa kebijakan organisasi untuk project Anda dengan menjalankan perintah gcloud beta resource-manager org-policies describe
compute.vmExternalIpAccess --project=my-project --effective.
Anda juga dapat mengganti kebijakan organisasi untuk project tertentu.
Namun, meskipun kebijakan organisasi tersebut ditetapkan, Anda dapat men-deploy aplikasi lingkungan fleksibel App Engine pribadi yang hanya menggunakan alamat IP internalnya.
Setelah Anda men-deploy versi baru dari layanan yang ada di lingkungan fleksibel App Engine dengangcloud app deploy, metrik "Count/sec" yang ditampilkan dalam grafik "Summary" dasbor App Engine dapat menurun secara signifikan. Metrik tersebut akan secara bertahap kembali ke jumlah permintaan yang diharapkan selama 5-10 menit ke depan.
Hal ini tidak berarti bahwa aplikasi Anda melayani lebih sedikit permintaan. Saat Anda men-deploy versi baru aplikasi, ada penundaan antara waktu versi baru siap melayani permintaan dan waktu saat metrik untuk instance baru tersedia.
Untuk memastikan bahwa metrik ini tidak terpengaruh oleh deployment versi baru:
Jika Anda men-deploy dengan --no-promote, tetapi mengalokasikan jumlah traffic ke versi baru sebelum periode 15 menit setelah deployment selesai, metrik ini mungkin akan terpengaruh.
Lingkungan fleksibel App Engine tidak dapat mengonfigurasi app.yaml sehingga
aplikasi Anda secara otomatis mengalihkan permintaan agar selalu menggunakan HTTPS. Ini berbeda
dari lingkungan standar App Engine, tempat Anda dapat menggunakan setelan secure.
Jika Anda menetapkan akun layanan yang dikelola pengguna ke versi lingkungan fleksibel App Engine, project Anda dapat dikenai biaya untuk metrik berawalan agent.googleapis.com. Biasanya, metrik agen ini tidak dikenai biaya ke project Anda. Sebaiknya terus gunakan akun layanan default App Engine hingga masalah ini teratasi.
Anda tidak dapat membuat koneksi SSH ke Instance VM menggunakan IAP.
Penurunan jumlah instance yang tidak terduga
Dalam peristiwa yang jarang terjadi, aplikasi Anda mungkin mengalami penurunan jumlah instance yang tidak terduga karena kegagalan zona, atau jika seluruh grup instance berhenti merespons. Untuk mencegah hal ini, Google merekomendasikan penyediaan aplikasi yang berlebihan agar sistem Anda tidak turun di bawah jumlah instance minimum. Anda dapat menetapkan ukuran min_num_instances aplikasi lingkungan fleksibel App Engine saat men-deploy-nya. Beberapa peristiwa yang dapat memengaruhi jumlah instance minimum lingkungan fleksibel App Engine adalah:
Kegagalan zona (Masalah kehabisan stok, seperti saat region Anda mencapai kapasitas penuh untuk CPU yang dipilih, dll.)
Lingkungan fleksibel App Engine menggunakan 3 zona untuk mendistribusikan instance Anda dan dalam konfigurasi tersebut, sebaiknya sediakan instance 50% lebih banyak dari yang diperlukan.
Metrik Cloud Load Balancing tidak konsisten
Dasbor lingkungan fleksibel App Engine hanya menampilkan semua metrik untuk permintaan yang dirutekan melalui backend terkelola lingkungan yang fleksibel. Jika Anda menggunakan lingkungan fleksibel App Engine dengan Cloud Load Balancing, metrik tertentu dalam tabel metrik App Engine dilaporkan sebagai metrik dari tabel loadbalancing. Untuk mengetahui informasi selengkapnya, lihat Logging dan monitoring Load Balancing HTTP(S).
InterruptedException dalam runtime yang menggunakan JVM selama kegagalan health check
Jika health check gagal, VM akan dimatikan. Sebagai gejala penampung aplikasi
yang tidak sehat, JVM merespons dengan error InterruptedException dan
NullPointerException. Pengendali dapat merespons sinyal SIGTERM
yang dikirim oleh penampung selama penonaktifan, untuk melakukan tindakan pembersihan atau
proses debug yang diperlukan, untuk mencegah pengecualian.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-19 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."]]