-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
maxProcesses and minProcesses does not work #622
Comments
I got this exact same problem! Is there a solution for already? |
Same problem here :( any ideas? |
If you look at AutoScaler.php on Line 100, you can see that if the time to clear is 0, it'll always return the max processes We could add another line so the function would be something like this:
But I don't know if that would have any side effects. EDIT: after running my own tests, it scales down to the minimum amount of processes, but it doesn't scale back up, even with 1 hour of jobs in the queue, needs more investigation. |
@driesvints check this comment :) |
I see the CI failed on 2 tests, but the 2 tests that fail:
both assume the amount of processes goes up to the maximum, when there are no jobs to handle, so either this change is undesirable, or the tests should be amended.. |
Thanks for investigating. Let's see how the pr goes. |
I have re-submitted my PR which I'm using on my production environment, this avoids having my queue instances running max processes continuously, while the min processes would suffice under normal load |
I would love to see this being merged. It’s quit a bug in my opinion.
Ronnie
…On 20 Aug 2019, 09:37 +0200, SDekkers ***@***.***>, wrote:
I have re-submitted my PR which I'm using on my production environment, this avoids having my queue instances running max processes continuously, while the min processes would suffice under normal load
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@SDekkers Really nice, today i have test it and it is great! But i have some questions:
Example: minProcesses 1 The process is started with 1 process, when there are a lot of jobs than 2 processes, but there are very high processes. Maybe it is better that change processes directly to the max processes (8)? Now it is scaling with +1 process. |
@tomswinkels it's the way Laravel Horizon is built, every 3 seconds it polls to check if the load is high enough to scale up, the function Alternatives could be increasing your minProcesses, or a new PR that allows adjusting the scale up/down increments (from 1 to 3 or 5) |
@SDekkers thnx for the reaction. And my other question? It don't works when the blance = false for the job. |
Well, if you specify that balance = false, it kind of disables the auto balancer function.. https://github.com/laravel/horizon/blob/3.0/src/SupervisorOptions.php#L125 |
We have the next config;
There are always running 8 processes for default, even when there are no jobs. On the dashboard and on the server processes list.
The text was updated successfully, but these errors were encountered: