Gunicorn暗恋GC AppEngine

时间:2019-04-25 10:26:52

标签: python google-app-engine google-cloud-platform gunicorn

今天,我尝试在Google Cloud AppEngine上部署Python应用程序。此版本以前已成功部署,但现在由于奇怪的原因而崩溃。
/ _ah / start上的请求返回502错误并显示消息:

This request caused a new process to be started for your application, and thus caused your application code to be loaded for the first time. This request may thus take longer and use more CPU than a typical request for your application.


然后几秒钟后
500状态代码以及下一条消息:

The request failed because the instance could not start successfully

错误报告显示此应用程序的一个例外:

File "/env/lib/python3.7/site-packages/gunicorn/arbiter.py", line 245, 
in handle_chld
at sleep (/env/lib/python3.7/site-packages/gunicorn/arbiter.py:360)
at run (/env/lib/python3.7/site-packages/gunicorn/arbiter.py:210)

以下消息也出现在日志中:

Application object must be callable.

因此,我不知道该怎么办,因为此版本之前部署得很好。

App.yaml:

runtime: python37
service: service_name
instance_class: B2

entrypoint: gunicorn -b :$PORT main:app.server

manual_scaling:
  instances: 1

0 个答案:

没有答案