Supervisor Configuration
To run the queue worker in production environment, we recommend running the worker using supervisor.
Supervisor is a process monitor for the Linux operating system, and will automatically restart your queue:work process if it fails.
Installing Supervisor
To install Supervisor on Ubuntu, you may use the following command:
Configuring Supervisor
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.
In this example, the numprocs directive will instruct Supervisor to run 10 queue:work processes and monitor all of them, automatically restarting them if they fail.
Starting Supervisor
Once the configuration file has been created, you may update the Supervisor configuration and start the processes using the following commands:
For more information on supervisor, consider the official documentation