I want to deploy Django + CloudSQL (Postgresql) + app engine flexible environment in google cloud.
My app.yaml setting
runtime: python
#gunicorn
env : flex
entrypoint : gunicorn -b 127.0.0.1 -p 8000 config.wsgi --timeout 120
#instance_class : F4
beta_settings:
cloud_sql_instances: icandoit-2021start:asia-northeast3:test-pybo=tcp:5434
runtime_config:
python_version: 3
gcloud app logs tail result
2021-02-03 11:02:17 default[20210203t195827] [2021-02-03 11:02:17 +0000] [1] [INFO] Starting gunicorn 19.7.1
2021-02-03 11:02:17 default[20210203t195827] [2021-02-03 11:02:17 +0000] [1] [INFO] Listening at: http://127.0.0.1:8000 (1)
2021-02-03 11:02:17 default[20210203t195827] [2021-02-03 11:02:17 +0000] [1] [INFO] Using worker: sync
2021-02-03 11:02:17 default[20210203t195827] [2021-02-03 11:02:17 +0000] [8] [INFO] Booting worker with pid: 8
2021-02-03 11:09:18 default[20210203t170353] [2021-02-03 11:09:18 +0000] [1] [INFO] Handling signal: term
2021-02-03 11:09:18 default[20210203t170353] [2021-02-03 11:09:18 +0000] [8] [INFO] Worker exiting (pid: 8)
2021-02-03 11:09:19 default[20210203t170353] [2021-02-03 11:09:19 +0000] [1] [INFO] Shutting down: Master
2021-02-03 11:09:19 default[20210203t170353] [2021-02-03 11:09:19 +0000] [1] [INFO] Handling signal: term
2021-02-03 11:09:19 default[20210203t170353] [2021-02-03 11:09:19 +0000] [8] [INFO] Worker exiting (pid: 8)
2021-02-03 11:09:20 default[20210203t170353] [2021-02-03 11:09:20 +0000] [1] [INFO] Shutting down: Master
2021-02-03 11:14:25 default[20210203t195827] "GET /" 502
django and gunicon works normally.
Why Do I Have 502 Errors?