laravel / framework

The Laravel Framework.
https://laravel.com
MIT License
32.21k stars 10.9k forks source link

Horizon does not honor maxProcesses = 0, instead it uses 1 process #52715

Closed kdocki closed 1 week ago

kdocki commented 1 week ago

Laravel Version

11

PHP Version

8.2

Database Driver & Version

No response

Description

I'm trying to make some queues in Horizon that I can manually control the handling of jobs with using Queue::pop('queue-01') instead of a worker in horizon handling it. I'd like to still be able to see the count of that queue in the horizon dashboard.

Steps To Reproduce

Make some supervisor settings in config/horizon.php

'defaults' => [
         // ... there could be other queues going, but they aren't relevant here...
        's6' => [
            'connection' => 'redis',
            'queue' => ['queue-01', 'queue-02', 'queue-03',],
            'balance' => 'false',
            'maxProcesses' => 0,  // <--- horizon will just use 1 instead here...
            'memory' => 128,
            'tries' => 1,
            'nice' => 0,
        ],
],

Now run php artisan horizon and you'll see there is a process running for these queues. I would expect no processes to be running.

crynobone commented 1 week ago

Hi there,

Thanks for reporting the problem you are encountering, but it looks like this is a question which may be better suited for a support channel. We only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repository you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.