Compiling Nginx on production. How to do it without down time.

bwellsnc bwellsnc at
Sat Oct 13 14:10:12 UTC 2012

To add, if you require 0 downtime then you really need to reevaluate
your environment.  Even in the linux world, things need to be
restarted or rebooted.  If you cannot be down for more than a few
seconds to allow for a software update, then you need to look into
setting up a clustered/load balanced environment.  I have 2 front end
load balancers with 4 backend web servers so to keep my environment up
and running.  This allows me to run software updates and system
reboots with little to no downtime.  At then end, it's keeping the
perception that you are up and running to your customers.

Just my 2 cents


On Sat, Oct 13, 2012 at 8:51 AM, Francis Daly <francis at> wrote:
> On Fri, Oct 12, 2012 at 08:25:36PM -0400, Bob S. wrote:
> Hi there,
>> I don't see how this can work.
> And yet, it does.
>> Trying to replace the nginx executable with a new version of nginx, while
>> nginx is running,  will produce:
>> cp: cannot create regular file `nginx': Text file busy
> I've never seen that error message.
> That's not to say that it doesn't happen; but that it is by no means
> universal.
>> Or am I missing something?
> It is possible to move, remove, rewrite, or replace a file, independent
> of whether it is being used by another process.
>> This is standard behavior on any running executable in Linux.
> I'd suggest that your Linux is not the same as my Linux.
> "standard behavior" is that "file being used" does not block "file
> being modified".
> All that said, if what "make install" does by default is not what you
> want, you can always "cp" or "mv" the old executable; then "cp", "mv",
> "cat", or otherwise, put the new executable in place.
> And then send the special nginx signals to ensure upgrade with zero
> downtime.
> (And it is possible that your system init script does exactly this.)
> All the best,
>         f
> --
> Francis Daly        francis at
> _______________________________________________
> nginx mailing list
> nginx at

More information about the nginx mailing list