diff --git a/src/AutoScaler.php b/src/AutoScaler.php index 09b42961..7c3be16e 100644 --- a/src/AutoScaler.php +++ b/src/AutoScaler.php @@ -115,10 +115,10 @@ protected function scalePool(Supervisor $supervisor, $pool, $workers) $poolProcesses = $pool->totalProcessCount(); - if (round($workers) > $poolProcesses && + if (ceil($workers) > $poolProcesses && $this->wouldNotExceedMaxProcesses($supervisor)) { $pool->scale($poolProcesses + 1); - } elseif (round($workers) < $poolProcesses && + } elseif (ceil($workers) < $poolProcesses && $poolProcesses > $supervisor->options->minProcesses) { $pool->scale($poolProcesses - 1); }