当使用 supervisor 来管理 gunicorn 的时候,supervisor 配置文件 myapp.conf 中的 command 为:
gunicorn -w4 -b0.0.0.0:8000 run:app 注:这是一个 flask 项目
然后用命令 sudo supervisord -c myapp.conf 启动项目
此时可以查找多条 gunicorn 进程,同时测试接口可用
那么如何关闭这些 gunicorn 进程呢?
实测用 sudo supervisorctl -c myapp.conf stop myapp 命令可以使接口不可访问,但是那些 gunicorn 进程还是存在,当我再次重启 sudo supervisorctl -c myapp.conf start myapp 的时候,进程又多了四个。
我应该如何利用 supervisor 来关闭这些 gunicorn 进程呢?