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:
- Updated Cloud SDK to the latest version - gcloud components update
- Increased memory allocation manually memory_gb: 2
- Adjusting 'app_start_timeout_sec' from default 300 to 600 seconds
- 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