
Supervisor is a client/server system that allows its users to monitor and control a number of processes on UNIX-like operating systems. Supervisor provides you with one place to start, stop, and monitor your processes. Processes can be controlled individually or in groups. You can configure Supervisor to provide a local or remote command line and web interface.
The supervisor is a process manager which Laravel suggests to use as a process monitor for queue workers. It will automatically start the queue worker in the background, even after the system has booted and will automatically restart the worker if the worker exits unexpectedly.
Steps to Install a Supervisor: A Process Control System for my Laravel Application in Linux based OS.
- Supervisor configuration files are typically stored in the /etc/supervisor/conf.d directory
- Within this directory, you may create any number of configuration files that instruct supervisor how your processes should be monitored
- For example, let's create a
mhn-queue.conf
file that starts and monitors a queue:work process:
Let’s consider an example.
[program:mhn-queue]
process_name=%(program_name)s_%(process_num)02d
command=php /home/forge/app.com/artisan queue:work database --sleep=3 --tries=3
autostart=true
autorestart=true
user=forge
numprocs=2
redirect_stderr=true
stdout_logfile=/home/forge/app.com/worker.log
stopwaitsecs=3600
NOTE: change the queue:work database portion of the command directive to reflect your desired queue connection. It could be Redis, sqs
in youre application. You can check it in config/queue.php
Once the configuration file has been created, you may update the Supervisor configuration and start the processes using the following commands:
sudo supervisorctl reread
sudo supervisorctl update
sudo supervisorctl start mhn-queue:*
Referance:



MotoShare.in is your go-to platform for adventure and exploration. Rent premium bikes for epic journeys or simple scooters for your daily errands—all with the MotoShare.in advantage of affordability and ease.