【发布时间】:2023-03-15 18:35:01
【问题描述】:
我想在谷歌云中部署Django + CloudSQL (Postgresql) + 应用引擎柔性环境。
我的 app.yaml 设置
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 应用记录尾部结果
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 和 gunicon 工作正常。
为什么会出现 502 错误?
【问题讨论】:
标签: django google-app-engine google-cloud-platform app-engine-flexible