I’ve been exploring Laravel 11 for a few weeks.
Today, I had to manage a queue system using Laravel Horizon v5.30.1 for the first time.
The issue is that, even after configuring all supervisor options for the “default” queue, Horizon is behaving strangely.
This is my supervisor configuration:
'local' => [
'supervisor-1' => [
'processes' => 3,
'minProcesses' => 3,
'maxProcesses' => 3,
'balance' => 'simple',
'maxTime' => (15 * 60), // 15 min
'maxJobs' => 10,
'timeout' => (15 * 60), // 15 min
],
],
I expected that 3 workers would be terminated after processing 10 jobs each and recreated (as recommended in the documentation to ensure resources are properly deallocated).
However Horizon supervisor stops workers after processing 2 jobs per worker and it doesn’t recreate them immediately but after an indefinite amount of time (sometimes 20 seconds, sometimes 30 seconds).
This behavior is illogical.
I’m doing something wrong? Anyone has same problem?
Thanks to all guys.
Fero94 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.