1. 首页
  2. 工具软件

进程管理Supervisor配置

进程管理Supervisor配置

supervisorctl

  • supervisorctl stop programxxx,停止某一个进程(programxxx),programxxx 为 [program:beepkg] 里配置的值,这个示例就是 beepkg。
  • supervisorctl start programxxx,启动某个进程。
  • supervisorctl restart programxxx,重启某个进程。
  • supervisorctl status,查看进程状态。
  • supervisorctl stop groupworker ,重启所有属于名为 groupworker 这个分组的进程(start,restart 同理)。
  • supervisorctl stop all,停止全部进程,注:start、restart、stop 都不会载入最新的配置文件。
  • supervisorctl reload,载入最新的配置文件,停止原有进程并按新的配置启动、管理所有进程。
  • supervisorctl update,根据最新的配置文件,启动新配置或有改动的进程,配置没有改动的进程不会受影响而重启。

 

Error处理:

#直接再/etc/supervisor 目录中操作负责容易报错;
vim ./config.d/confluence.ini #修改配置
unlink /***/supervisor.sock #sock 解锁
supervisord -/etc/supervisor/supervisord.conf
supervisorctl reload
supervisorctl status
 
 
有可能由于配置过程,导致开启了过多的 /usr/bin/python /bin/supervisord -/etc/supervisor/supervisord.conf 进程,可以批量删除
ps -ef|grep supervisor|grep -v grep|cut -9-15|xargs kill -9   避免被管理程序运行过多,出现启动失败;

 

2.使用supervisorctl tail program_name stderr命令查看错误信息
从配置文件supervisor-mysite.conf中可以看到program的名字是mysite,即program_name, 然后使用命令:

sudo supervisorctl tail mysite stderr

参考

[(43条消息) supervisor错误:ERROR (spawn error)_此生小会的博客-CSDN博客](https://blog.csdn.net/cckavin/article/details/103023335)

[[Linux] Supervisor的使用 – 胡伟煌 | Blog](https://www.huweihuang.com/article/linux/supervisor-usage/)

 

发表评论

邮箱地址不会被公开。