我已经使用 brew 在我的 macbook(macOS monterey - m1 芯片)上安装了 uwsgi。我的 main.py 看起来像这样:
app = Flask("my_app")
import routing # implemented routes in this module
我的 uwsgi.ini 文件如下所示:
[uwsgi]
module = main:app
master = true
http-socket = :8081
processes = 4
当我跑步时
$ uwsgi --ini uwsgi.ini
这会发生:
.
.
.
*** Operational MODE: preforking ***
*** no app loaded. going in full dynamic mode ***
*** uWSGI is running in multiple interpreter mode ***
!!!!!!!!!!!!!! WARNING !!!!!!!!!!!!!!
no request plugin is loaded, you will not be able to manage requests.
you may need to install the package for your language of choice, or simply load it with --plugin.
!!!!!!!!!!! END OF WARNING !!!!!!!!!!
spawned uWSGI master process (pid: 95857)
spawned uWSGI worker 1 (pid: 95858, cores: 1)
spawned uWSGI worker 2 (pid: 95859, cores: 1)
spawned uWSGI worker 3 (pid: 95860, cores: 1)
spawned uWSGI worker 4 (pid: 95861, cores: 1)
我以前在大苏尔可以做到这一点,但现在在蒙特雷,它的表现很奇怪。(pip install uwsgi 也会导致错误,在另一篇文章中询问)