Supervisord config

Hi

For setting up supervisord, is this config enough?

[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php7.4 /var/www/invoiceninja/artisan queue:work --sleep=3 --tries=3 --daemon --max-time=3600
autostart=true
autorestart=true
user=www-data
numprocs=3
redirect_stderr=true
stdout_logfile=/var/www/invoiceninja/storage/logs/worker.log

Thanks

Hi,

@david can you please advise?

I think it is close, here is another example. I don’t think you need to use daemonize as supervisor monitors itself.

[program:laravel-worker]
command=/usr/bin/php8.0 /current/artisan queue:work --sleep=3 --tries=1 --memory=512 --timeout=10800
process_name=%(program_name)s_%(process_num)02d
autostart=true
autorestart=true
redirect_stderr=true
numprocs=3
user=www-data
killasgroup=true
stopasgroup=true

Great, thanks.
queue:work is the only one needed? That handles everything?

Yeh, that is the only thing required to manage the queue’s

When using supervisord, is the crontab “artisan schedule:run” still necessary or does the qeue:work in supervisord do all the work?

@KrisL

They perform different tasks.

The cron manages the scheduled tasks such as recurring invoices, Autobilling and reminders.

Ahh okay. And these scheduled tasks from the cronjob are then queued in supervisor. Correct?