Welcome! Log In Create A New Profile

Advanced

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

Francis Daly
October 13, 2012 08:52AM
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@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

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

Quintin Par October 11, 2012 08:10PM

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

Francis Daly October 11, 2012 08:28PM

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

Quintin Par October 12, 2012 04:30PM

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

Priority1 October 12, 2012 04:46PM

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

Francis Daly October 12, 2012 05:28PM

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

Bob S. October 12, 2012 08:28PM

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

bwellsnc October 13, 2012 12:52AM

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

VBart October 13, 2012 08:12AM

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

VBart October 13, 2012 08:22AM

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

Francis Daly October 13, 2012 08:52AM

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

bwellsnc October 13, 2012 10:12AM

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

Bob S. October 14, 2012 01:18PM

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

António P. P. Almeida October 13, 2012 07:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 258
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready