使用Supervisor来管理你的Laravel队列

Posted yaolunhui

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了使用Supervisor来管理你的Laravel队列相关的知识,希望对你有一定的参考价值。

第一步安装Supervisor

第二步设置配置文件 路劲etc/supervisor/conf.d

新建一个 conf文件  fenxi.conf

文件内容如下

[program:waaQueue]
command = php artisan queue:work --daemon
directory = /var/www/html/fenxi
process_name = %(program_name)s_%(process_num)s
numprocs = 1
autostart = true
autorestart = true
stdout_logfile = /var/www/html/fenxi/storage/logs/supervisor_waaQueue.log
stdout_logfile_maxbytes = 10MB
stderr_logfile =/var/www/html/fenxi/storage/logs/supervisor_wqqQueue.log
stderr_logfile_maxbytes = 10MB

 

重启 

supervisorctl restart

重新加载配置文件

supervisorctl reread











以上是关于使用Supervisor来管理你的Laravel队列的主要内容,如果未能解决你的问题,请参考以下文章

Supervisor管理Laravel队列进程报错

Linux centos 安装 supervisor 管理 Laravel 队列

如何使用supervisor管理你的应用

使用 Supervisor 运行多个 Laravel 队列工作者

在 laravel 中使用 Supervisor 运行棘轮 websockets 和队列

沉寂许久,来一个工具——supervisor