python - Gunicorn 迷恋 GC AppEngine
问题描述
今天我尝试在 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.
所以,我不明白什么是错误的,因为这个版本之前部署得很好。
应用程序.yaml:
runtime: python37
service: service_name
instance_class: B2
entrypoint: gunicorn -b :$PORT main:app.server
manual_scaling:
instances: 1
解决方案
推荐阅读
- javascript - 相邻的 JSX 元素必须包裹在封闭标记 reactjs 中
- pip - 为什么在 pip.ini 文件中配置代理的 pip install 出现 403 禁止错误?
- java - 我得到一个 java.nio.charset.MalformedInputException: Input length = 1 while gradle upgrade to version 3.1.4
- java - 如何在 Maven 中运行单个集成测试?
- java - 在春季请求中验证枚举
- xamarin.forms - Xamarin Forms 内容页面使背景颜色透明
- php - jquery输出不能单独在php执行的帖子上工作
- asp.net - 无法在客户端计算机上编辑水晶报表。
- java - 目标窗口已因未知错误关闭:未找到 Web 视图
- ruby-on-rails - SyntaxError:net-sftp.rb:48:语法错误,意外的 tCONSTANT 将 Ruby 中的“文件传输完成”从 Filezilla 客户端放到本地主机