Flask App fails to deploy into GCP as an App Engine Flex project

46 views
Skip to first unread message

Maksims Kompanijecs

unread,
Aug 8, 2019, 1:45:12 PM8/8/19
to Google App Engine
Hi,

Trying to deploy my Flask App into GCP using App Engine Flex environment. Deployment fails every single time and the following error message is displayed

GCLOUD: ERROR: (gcloud.app.deploy) Error Response: [4] 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.

OR

ERROR: (gcloud.app.deploy) Error Response: [4] Timed out waiting for the app infrastructure to become healthy.

I have tried to do the following:

  1. Updated Cloud SDK to the latest version - gcloud components update
  2. Increased memory allocation manually memory_gb: 2
  3. Adjusting 'app_start_timeout_sec' from default 300 to 600 seconds 
  4. Disable health checks gcloud app update --no-split-health-check

app.yaml

runtime: python
env: flex

handlers:
- url: /.*
  script: main.py

runtime_config:
  python_version: 3

resources:
  cpu: 2
  memory_gb: 2
  disk_size_gb: 10

readiness_check:
  path: "/readiness_check"
  check_interval_sec: 5
  timeout_sec: 4
  failure_threshold: 2
  success_threshold: 2
  app_start_timeout_sec: 300







Diogo Almeida

unread,
Aug 8, 2019, 7:51:58 PM8/8/19
to Google App Engine
Please note that Google Groups is reserved for general product discussions and not for reporting issues. Issue Tracker should be used to report Google Cloud Platform-end issues and feature requests [1]. 

The issue you report here has already been addressed in these threads [2][3][4]. It is a known issue and you will find some troubleshooting steps you can use to resolve it in the threads.

That said, if you still cannot resolve this issue, I recommend that you report it in the Issue Tracker. In that case, please deploy the app using the “gcloud app deploy” command with the “--verbosity=debug” and “gcloud info” with --anonymize parameter enabled to provide us the stack trace and additional information about the current gcloud environment so that we will be able to investigate the issue root cause in the Issue Tracker thread.

Reply all
Reply to author
Forward
0 new messages