diff --git a/src/AutoScaler.php b/src/AutoScaler.php index 26a2dfa8..65d0da1f 100644 --- a/src/AutoScaler.php +++ b/src/AutoScaler.php @@ -144,7 +144,7 @@ protected function scalePool(Supervisor $supervisor, $pool, $workers) $pool->scale( min( $totalProcessCount + $maxUpShift, - $supervisor->options->maxProcesses - (($supervisor->processPools->count() - 1) * $supervisor->options->minProcesses), + max($supervisor->options->minProcesses, $supervisor->options->maxProcesses - (($supervisor->processPools->count() - 1) * $supervisor->options->minProcesses)), $desiredProcessCount ) );