启动后不久,uWSGI被“杀死”

时间:2019-07-15 20:00:00

标签: python docker nginx flask uwsgi

我正在尝试在uWSGI开发服务器上运行Flask api。在我的uwsgi.ini中,我有:

[uwsgi]
module = api
callable = app
master = true

当我运行uwsgi --socket 0.0.0.0:5002 --protocol uwsgi --ini ./uwsgi.ini时,它开始正确运行,打印它正在加载我的一个模型,但是随后它只说“杀死”并退出。我如何获得有关退出原因的更多信息?谢谢。

完整输出:

[uWSGI] getting INI configuration from ./uwsgi.ini
*** Starting uWSGI 2.0.18 (64bit) on [Mon Jul 15 19:55:29 2019] ***
compiled with version: 6.3.0 20170516 on 15 July 2019 18:05:17
os: Linux-4.9.125-linuxkit #1 SMP Fri Sep 7 08:20:28 UTC 2018
nodename: b8e2862b0584
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 2
current working directory: /opt/app/Paraphrasing/Paraphrase_Demo
detected binary path: /usr/local/bin/uwsgi
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 0.0.0.0:5002 fd 3
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
Python version: 3.7.3 (default, Jun 11 2019, 01:05:09)  [GCC 6.3.0 20170516]
*** Python threads support is disabled. You can enable it with --enable-threads ***
Python main interpreter initialized at 0x5646a0f5a310
uWSGI running as root, you can use --uid/--gid/--chroot options
*** WARNING: you are running uWSGI as root !!! (use the --uid flag) ***
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 145840 bytes (142 KB) for 1 cores
*** Operational MODE: single process ***
WRN: Linux system doesn't support windows job object yet. OS: Unix 4.9.125.0
Set device to: -2
Load model from /opt/app/en_v0.4/model.11
Model loaded in 3691ms
Loading Finish from Files: 07/15/2019 19:55:36
The pre-trained model you are loading is a cased model but you have not set `do_lower_case` to False. We are setting `do_lower_case=False` for you but you may want to check this behavior.
| [en] dictionary: 40000 types
| [zh] dictionary: 40000 types
| loading model(s) from ../Paraphrase_Demo/models/enzh/checkpoint/checkpoint_2_152000.pt
Killed

编辑:Flask应用程序本身并未真正启动,在运行该应用程序之前,在api.py顶部的导入过程中服务器被杀死。而且,flask应用程序在开发模式下可以正常运行。

0 个答案:

没有答案