Maintaining capacity during deploys

Eric Wong normalperson at
Fri Nov 30 01:24:47 UTC 2012

Tony Arcieri <tony.arcieri at> wrote:
> On Thu, Nov 29, 2012 at 3:34 PM, Lawrence Pit <lawrence.pit at> wrote:
> >
> > Perhaps it's possible to warm up the workers in the unicorn after_fork block?
> Are people doing this in production (i.e. moving the termination of
> the old master from before_fork to after_fork)? My worry is that
> during this warming process you will have 2X the normal number of
> Unicorn workers active at the same time, which could potentially lead
> to exhausting of system resources (i.e. RAM)

I haven't done any terminations in the *_fork hooks for a long time.
I just let 2x the normal workers run for a bit before sending SIGQUIT.

That said, I usually have plenty of RAM (and DB connections) to spare.
Excessive CPU-bound loads are handled very well nowadays.

More information about the mongrel-unicorn mailing list