Support the ongoing development of Laravel.io →
Configuration Queues Installation

I'm using Laravel workers to execute some background tasks. When I invoke the worker using 'php artisan queue:work', it works without any problem

But when I add the same command to supervisord in CentOS, using the following congifuration:

[program:laravel-worker]

process_name=%(program_name)s_%(process_num)02d command=php

/var/www/html/laravel/artisan queue:work autostart=true

autorestart=true user=root numprocs=8 redirect_stderr=true

stdout_logfile=/var/www/html/laravel/worker.log

The jobs are not executed complaining that SoapClient is not found (although it is installed). The SoapClient class is inherited by a plain PHP class that I load externally.

Note that I can use this class via the controller or the jobs when executed from command line without any problem, only in supervisord it's giving me the error message. To make things more weird, it happens only with one job that utilizes this external class, it doesn't happen with jobs that utilize Laravel's classes (controllers, events, etc...) only.

Last updated 2 years ago.
0

I could solve it by specifying the exact path of the php binary I still don't understand why it didn't pick the default one

0

Sign in to participate in this thread!

Eventy

Your banner here too?

fifothekid fifothekid Joined 21 Dec 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.