Welcome! Log In Create A New Profile

Advanced

Problem with On The Fly Upgrade

Benji Taylor
November 03, 2015 12:42AM
I am currently experiencing an issue using the on the fly upgrade feature
of nginx. I am attempting the upgrade going from 1.4.1 to 1.8.1 on Ubuntu
12.04. Here is the process I am utilizing:

Here is initial look at my running nginx:

/etc/nginx# ps aux | grep nginx

root 18779 0.5 0.6 416156 26756 ? Ss 05:24 0:00 nginx:
master process /usr/sbin/nginx

www-data 18780 0.0 0.8 424648 35528 ? S 05:24 0:00 nginx:
worker process

www-data 18781 0.0 0.8 424648 35284 ? S 05:24 0:00 nginx:
worker process

www-data 18782 0.0 0.8 424648 35284 ? S 05:24 0:00 nginx:
worker process

www-data 18783 0.0 0.8 424648 35284 ? S 05:24 0:00 nginx:
worker process

www-data 18784 0.0 0.6 416156 27084 ? S 05:24 0:00 nginx:
cache manager process

www-data 18785 0.0 0.6 416156 27084 ? S 05:24 0:00 nginx:
cache loader process

root 18861 0.0 0.0 9384 940 pts/2 S+ 05:25 0:00 grep
--color=auto nginx


First command in the process is run:

:/etc/nginx# sudo kill -s USR2 18779

result:

/etc/nginx# ps aux | grep nginx

root 18779 0.0 0.6 416156 26756 ? Ss 05:24 0:00 nginx:
master process /usr/sbin/nginx

www-data 18780 0.0 0.8 424648 35528 ? S 05:24 0:00 nginx:
worker process

www-data 18781 0.0 0.8 424648 35284 ? S 05:24 0:00 nginx:
worker process

www-data 18782 0.0 0.8 424648 35284 ? S 05:24 0:00 nginx:
worker process

www-data 18783 0.0 0.8 424648 35284 ? S 05:24 0:00 nginx:
worker process

www-data 18784 0.0 0.6 416156 27084 ? S 05:24 0:00 nginx:
cache manager process

root 23762 8.0 0.8 416156 32908 ? S 05:27 0:00 nginx:
master process /usr/sbin/nginx

www-data 23763 6.0 0.8 424648 35280 ? S 05:27 0:00 nginx:
worker process

www-data 23764 7.0 0.8 424648 35280 ? S 05:27 0:00 nginx:
worker process

www-data 23765 4.0 0.8 424648 35280 ? S 05:27 0:00 nginx:
worker process

www-data 23766 4.0 0.8 424648 35280 ? S 05:27 0:00 nginx:
worker process

www-data 23767 0.0 0.6 416156 27084 ? S 05:27 0:00 nginx:
cache manager process

www-data 23768 0.0 0.6 416156 27084 ? S 05:27 0:00 nginx:
cache loader process

root 23815 0.0 0.0 9384 944 pts/2 S+ 05:27 0:00 grep
--color=auto nginx


Second Command is run:

/etc/nginx# sudo kill -s WINCH 18779

Result:

/etc/nginx# ps aux | grep nginx

root 18779 0.0 0.6 416156 26756 ? Ss 05:24 0:00 nginx:
master process /usr/sbin/nginx

root 23762 0.1 0.8 416156 32908 ? S 05:27 0:00 nginx:
master process /usr/sbin/nginx

www-data 23763 0.0 0.8 424648 35524 ? S 05:27 0:00 nginx:
worker process

www-data 23764 0.0 0.8 424648 35280 ? S 05:27 0:00 nginx:
worker process

www-data 23765 0.0 0.8 424648 35280 ? S 05:27 0:00 nginx:
worker process

www-data 23766 0.0 0.8 424648 35280 ? S 05:27 0:00 nginx:
worker process

www-data 23767 0.0 0.6 416156 27084 ? S 05:27 0:00 nginx:
cache manager process

root 26172 0.0 0.0 9384 944 pts/2 S+ 05:28 0:00 grep
--color=auto nginx


Everything up through this point looks like it works as intended. However
the last step when shutting down the old master process. I am getting
unexpected behavior:

/etc/nginx# sudo kill -s QUIT 18779

Result:

/etc/nginx# ps aux | grep nginx

root 31133 0.0 0.0 9384 944 pts/2 S+ 05:31 0:00 grep
--color=auto nginx


The QUIT signal seems to be killing both the old master pid as well as the
new master and all of the new master's workers. I also do a pstree and it
looks like the old master is the parent for the new master and its workers.

Am I doing anything wrong in regards to the on the fly upgrade process
which is causing this behavior and or could something else on the box cause
this sort of thing to occur.


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

Problem with On The Fly Upgrade

Benji Taylor November 03, 2015 12:42AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 229
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