REGION_ID는 앱을 만들 때 선택한 리전을 기준으로 Google에서 할당하는 축약된 코드입니다. 일부 리전 ID는 일반적으로 사용되는 국가 및 주/도 코드와 비슷하게 표시될 수 있지만 코드는 국가 또는 주/도와 일치하지 않습니다. 2020년 2월 이후에 생성된 앱의 경우 REGION_ID.r이 App Engine URL에 포함됩니다. 이 날짜 이전에 만든 기존 앱의 경우 URL에서 리전 ID는 선택사항입니다.
gcloud app deploy로 애플리케이션을 배포한 후 애플리케이션이 https://PROJECT_ID.REGION_ID.r.appspot.com에서 서비스 제공을 시작하기까지 1~2분이 소요될 수 있습니다. 그때까지 HTTP 503 오류가 표시될 수 있습니다.
App Engine은 이러한 오류를 전역 외부 애플리케이션 부하 분산기 로그에 backend_timeout 또는 failed_to_pick_backend로 로깅하는 경우가 많습니다. 전역 외부 애플리케이션 부하 분산기는 개별 인스턴스의 상태와 관계없이 App Engine 가변형 환경의 서비스에 요청을 전송합니다.
새 버전을 배포한 후 전역 외부 애플리케이션 부하 분산기에서 새 백엔드 인스턴스로 구성을 업데이트하는 데 시간이 걸립니다. 이 전환 기간에는 백엔드 서비스의 가용성이 일관되지 않습니다. 트래픽을 새 버전으로 마이그레이션할 때 전역 외부 애플리케이션 부하 분산기가 요청을 수신할 준비가 완전히 되지 않은 인스턴스에 트래픽을 전송하려고 시도하여 503 오류가 발생할 수 있습니다. 특히 기존 애플리케이션 부하 분산기를 사용할 때 502 오류가 발생할 수도 있습니다.
프로젝트에 외부 IP에 대한 액세스를 제한하는 조직 정책이 있는 경우 외부 IP 주소를 사용하여 App Engine 가변형 환경 앱을 배포할 수 없습니다. 예를 들어 조직 정책은 다음과 같이 표시될 수 있습니다.
constraints/compute.vmExternalIpAccess에 관한 유효 정책은 DENY_ALL로 설정됩니다.
constraints/compute.vmExternalIpAccess에 관한 유효 정책은 특정 VM 인스턴스만 허용하도록 설정됩니다.
메타데이터 업데이트를 방지하기 위해 프로젝트에서 constraints/compute.requireOsConfig에 관한 유효 정책이 사용 중지됩니다.
이러한 제약은 자동으로 감지되지 않으므로 배포 시간이 초과되어 배포에 실패할 수 있습니다. gcloud beta resource-manager org-policies describe
compute.vmExternalIpAccess --project=my-project --effective 명령어를 실행하여 프로젝트의 조직 정책을 확인할 수 있습니다.
특정 프로젝트의 조직 정책을 재정의할 수도 있습니다.
그러나 이러한 조직 정책을 설정한 경우에도 내부 IP 주소만 사용하는 비공개 App Engine 가변형 환경 앱을 배포할 수 있습니다.
gcloud app deploy를 사용하여 App Engine 가변형 환경에 기존 서비스의 새 버전을 배포한 후 App Engine 대시보드의 '요약' 그래프에 표시되는 '개수/초' 측정항목이 현저하게 줄어들 수 있습니다. 측정항목은 앞으로 5~10분 동안 예상되는 요청 수로 점차 되돌아갑니다.
그렇다고 해서 애플리케이션의 요청 수가 줄어든 것은 아닙니다. 애플리케이션의 새 버전을 배포할 때 새 버전의 요청을 처리할 준비가 된 시간과 새 인스턴스의 측정항목을 사용할 수 있게 된 시간 사이에 지연이 발생합니다.
App Engine 가변형 환경 버전에 사용자 관리 서비스 계정을 할당하면 agent.googleapis.com 프리픽스가 붙은 측정항목의 비용이 프로젝트에 청구될 수 있습니다. 일반적으로 이러한 에이전트 측정항목은 프로젝트에 요금이 청구되지 않습니다. 이 문제가 해결될 때까지 App Engine 기본 서비스 계정을 계속 사용하는 것이 좋습니다.
IAP를 사용하여 VM 인스턴스에 SSH 연결을 설정할 수 없습니다.
예기치 않은 인스턴스 수 감소
드물지만 영역 장애로 인해 또는 전체 인스턴스 그룹이 응답하지 않는 경우 애플리케이션에서 예기치 않게 인스턴스 수가 감소할 수 있습니다. 이를 방지하려면 시스템이 최소 인스턴스 수 미만으로 떨어지지 않도록 애플리케이션을 오버프로비저닝하는 것이 좋습니다. App Engine 가변형 환경 애플리케이션을 배포할 때 min_num_instances 크기를 설정할 수 있습니다. App Engine 가변형 환경의 최소 인스턴스 수에 영향을 줄 수 있는 이벤트는 다음과 같습니다.
App Engine 가변형 환경은 3개 영역을 사용하여 인스턴스를 배포하며, 이러한 구성에서는 필요한 인스턴스보다 50% 많은 인스턴스를 프로비저닝하는 것이 권장됩니다.
일관되지 않은 Cloud Load Balancing 측정항목
App Engine 가변형 환경 대시보드에는 가변형 환경 관리형 백엔드를 통해 라우팅된 요청에 대한 모든 측정항목만 표시됩니다. App Engine 가변형 환경을 Cloud Load Balancing과 함께 사용하면 App Engine 측정항목 테이블의 특정 측정항목이 대신 loadbalancing 테이블의 측정항목으로 보고됩니다. 자세한 내용은 HTTP(S) 부하 분산 로깅 및 모니터링을 참조하세요.
상태 점검 실패 중에 JVM을 사용하는 런타임의 InterruptedException
상태 점검에 실패하면 VM이 종료됩니다. 앱 컨테이너가 비정상적으로 되는 증상으로 JVM은 InterruptedException 및 NullPointerException 오류로 응답합니다. 핸들러는 종료 중에 컨테이너에서 전송하는 SIGTERM 신호에 응답하여 예외를 방지하기 위해 필요한 정리 또는 디버깅 작업을 수행할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(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."]]