Cip*_*Cit 2 django google-app-engine google-cloud-storage
我在 GAE 中部署了我的 django 项目,除主页面外,所有页面上都出现 502 Bad Gateway 错误。以前的版本可以正常工作,但由于我添加了存储 API 调用 (storages.backends.gcloud.GoogleCloudStorage) 后无法正常工作。我在 settings.py 和 app.yaml 中都添加了环境变量 GOOGLE_APPLICATION_CREDENTIALS。日志显示此错误:
[error] 32#32: *111 upstream prematurely closed connection while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: , request: "GET /accounts/login/ HTTP/1.1", upstream: "http://xxx.xxx.xxx.xxx:8080/accounts/login/", host: "xxxx.appspot.com", referrer: "https://xxxx.appspot.com/"
Run Code Online (Sandbox Code Playgroud)
一切都在本地工作,所以我只有这条消息。我尝试了来自 google 群组和其他 stackoverflow 问题的东西,但它不起作用。
谢谢你。
gcloud app logs tail -s default告诉您错误消息,因此请确保检查输出。我的是django.core.exceptions.ImproperlyConfigured: mysqlclient 1.3.13 or newer is required; you have 0.9.3.
我犯的其他一些错误是:
ALLOWED_HOSTS和DATABASESin 的错误值settings.pystatic_dirin 的错误值app.yamlmain.py| 归档时间: |
|
| 查看次数: |
3376 次 |
| 最近记录: |