Closed bdmac closed 10 years ago
Ugh, missed that this was checked in :under_memory
. I'm still curious though what the point of the conditional was then?
auto.call(:under_memory) if memory + workers.last.memory
What was that intended to do? I mean if x + y
should always be truthy right?
Hmm. Seems like if memory + workers.last.memory
was a fragment as it will always return true. I've updated some of the algorithm on master. The reap_cycle was not running multiple times as it should which is what likely caused the problem you were seeing.
I believe that
:cycle
was always intended to grow workers by calling :under_memory if the estimate of how much memory we would use by adding a worker is safe given constraints of PumaAutoTune.ram. The existingif
check in :cycle did not actually check anything I don't believe.