Supervisor启动队列失败
Supervisor配置(基于宝塔)
[program:laravel-queue]
command=php artisan queue:work –tries=3
directory=/www/wwwroot/private.saas.com/
autorestart=true
startsecs=3
startretries=3
stdout_logfile=/www/server/panel/plugin/supervisor/log/laravel-queue.out.log
stderr_logfile=/www/server/panel/plugin/supervisor/log/laravel-queue.err.log
stdout_logfile_maxbytes=2MB
stderr_logfile_maxbytes=2MB
user=www
priority=999
numprocs=1
process_name=%(program_name)s_%(process_num)02d
日志信息
ErrorException
Trying to access array offset on value of type null
at vendor/laravel/framework/src/Illuminate/Queue/QueueManager.php:156
152▕ protected function resolve($name)
153▕ {
154▕ $config = $this->getConfig($name);
155▕
➜ 156▕ return $this->getConnector($config['driver'])
157▕ ->connect($config)
158▕ ->setConnectionName($name);
159▕ }
160▕
[2m+18 vendor frames [22m
19 artisan:37
Illuminate\Foundation\Console\Kernel::handle()
命令写错了,应该是 php artisan queue:work --tries=3