Supervisor Config Generator
Generate a Supervisor program for Laravel queue workers or any long-running command, with process count, user, logs and a safe stop timeout.
Free · No sign-up · Your inputs stay in your browser
Input
Generate a Supervisor program
Output
/etc/supervisor/conf.d/laravel-worker.conf
417 characters
Load it with sudo supervisorctl reread && sudo supervisorctl update, then sudo supervisorctl start 'laravel-worker:*'. This is the shape the Laravel queue documentation uses; after each deploy run php artisan queue:restart so workers finish their job and reload the code.
Runs in this browser. Nothing you paste is sent to a server.
About this tool
Method, assumptions, practical next steps, and limits.
Why a worker needs supervising
php artisan queue:work is a long-running process that exits on fatal errors, when it hits --max-time or --max-jobs, and on queue:restart. Something has to start it again, and the Laravel queue docs use Supervisor for that. systemd works just as well.
Stop timeouts
On a deploy or a stop, Supervisor sends SIGTERM and waits stopwaitsecs before SIGKILL. Laravel's worker finishes its current job on SIGTERM, so the wait must be longer than your longest job, or the job is killed half done and retried.