Category: Laravel, Laravel, MySQL, MySQL, git, git

This is part1 of the series which is about configuring horizon and supervisor to work in the production, to read the first part about the introduction to setup horizon, visit the link: We have successfully setup horizon locally in the first part, now it’s the time to get into configuration part, which is probably the more difficult and boring. To understand the next steps, it’s essential to have some basic knowledge on some concepts related to the queue configuration in Linux.

The importance of supervisor in our case is that we have to use it to monitor the process that is in charge of running the workers.

And to be able to debug the issues generated by horizon itself, we set the value of redirect_stderr to be true and the file that will include these logs will be the value of the key stdout_logfile which is /var/log/horizon-worker.log so you can cat or echo this file's content whenever you find that the supervisor is working fine but there is still an issue.

In other words, each service installed in Linux should have such kind of script so that you can call the following command: For example for apache service to be restarted, you can run: Which will use the script file of apache which is in /etc/init.d/apache and call that restart method to restart the apache service.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners