如何正确/完全关闭supervisor进程?
我正在使用 Supervisor 来启动和管理 nginx 进程。到目前为止,这工作得很好。我遇到的问题是关闭实例。
我尝试过使用“supervisorctl -c shutdown [all]”,这会关闭守护进程,并且在supervisorctl交互式控制台中它说nginx已停止。但是,如果我执行 ps -A | grep nginx 命令它仍然出现在列表中。
我的 nginx 实例配置如下:
[program:nginx]
command=./bin/nginx
-p /home/me/sites/project.domain.com/
-c project/etc/nginx.conf
directory=/home/me/sites/project.domain.com
autostart=true
autorestart=true
redirect_stderr=true
exitcodes=0
stopsignal=TERM
有什么建议为什么 nginx 无法关闭吗?
I am using supervisor to launch and manage a nginx process. So far this works perfectly. The problem I am having is shutting down the instance.
I have tried using "supervisorctl -c shutdown [all]" and this shuts down the daemon and in the supervisorctl interactive console it says nginx is stopped. However, if I do a ps -A | grep nginx command it still appears in the list.
My config for the nginx instance is as follows:
[program:nginx]
command=./bin/nginx
-p /home/me/sites/project.domain.com/
-c project/etc/nginx.conf
directory=/home/me/sites/project.domain.com
autostart=true
autorestart=true
redirect_stderr=true
exitcodes=0
stopsignal=TERM
Any suggestion why nginx could not be shutting down?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你确定你没有以守护进程模式启动 nginx 吗? 以非守护模式启动 Supervisor 的所有子进程非常重要 。我目前手头没有 nginx 启动选项,但这可能会给您一个正确的开始。
Have you made sure you are not starting up nginx in daemonized mode? It is important you start all your child-processes of supervisor in non-daemonized mode. I currently don't have nginx boot options at hand, but this might give you a start in the right direction.