<html><head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">According to the
documentation: <a class="moz-txt-link-freetext" href="http://nginx.org/en/docs/control.html#upgrade">http://nginx.org/en/docs/control.html#upgrade</a><br>
<br>
You'd have to send the QUIT signal to finish off upgrading (replacing)
the binary during runtime.<br>
<br>
<span>Marc Soda wrote:</span><br>
<blockquote style="word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;"
cite="mid:878FBB66-318B-458B-9792-90C2767518C6@soda.fm" type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<div class="">I sent WINCH to the old master. In this case 32277.</div>
<div class=""><br class=""></div>
<div class="">After sending WINCH, I can send QUIT to the old master
and it exits. Everything looks fine at that point. But it seems a
little odd to have to do this.<br class=""><div class=""><br class=""><div><blockquote
type="cite" class=""><div class="">On Apr 4, 2017, at 4:43 AM, Lucas
Rolff <<a moz-do-not-send="true" href="mailto:lucas@lucasrolff.com"
class="">lucas@lucasrolff.com</a>> wrote:</div><br
class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space; font-size: 14px; font-family:
Calibri, sans-serif;" class="">
<div class="">
<div class="">Hello Marc,</div>
<div class=""><br class="">
</div>
<div class="">For which PID do you send the WINCH signal?</div>
<div class=""><br class="">
</div>
<div class="">
</div>
</div>
<div class=""><br class="">
</div>
<span id="OLK_SRC_BODY_SECTION" class="">
<div style="font-family: Calibri; font-size: 12pt; text-align: left;
border-width: 1pt medium medium; border-style: solid none none; padding:
3pt 0in 0in; border-top-color: rgb(181, 196, 223);" class="">
<span style="font-weight:bold" class="">From: </span>nginx <<a
moz-do-not-send="true" href="mailto:nginx-bounces@nginx.org" class="">nginx-bounces@nginx.org</a>>
on behalf of Marc Soda <<a moz-do-not-send="true"
href="mailto:marc@soda.fm" class="">marc@soda.fm</a>><br class="">
<span style="font-weight:bold" class="">Reply-To: </span>"<a
moz-do-not-send="true" href="mailto:nginx@nginx.org" class="">nginx@nginx.org</a>"
<<a moz-do-not-send="true" href="mailto:nginx@nginx.org" class="">nginx@nginx.org</a>><br
class="">
<span style="font-weight:bold" class="">Date: </span>Tuesday, 4 April
2017 at 04.04<br class="">
<span style="font-weight:bold" class="">To: </span>"<a
moz-do-not-send="true" href="mailto:nginx@nginx.org" class="">nginx@nginx.org</a>"
<<a moz-do-not-send="true" href="mailto:nginx@nginx.org" class="">nginx@nginx.org</a>><br
class="">
<span style="font-weight:bold" class="">Subject: </span>Binary upgrade
with systemd<br class="">
</div>
<div class=""><br class="">
</div>
<span style="mso-bookmark:_MailOriginalBody" class="">
<blockquote id="MAC_OUTLOOK_ATTRIBUTION_BLOCKQUOTE" style="BORDER-LEFT:
#b5c4df 5 solid; PADDING:0 0 0 5; MARGIN:0 0 0 5;" class=""><div
class="">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space;
-webkit-line-break: after-white-space;" class="">
<div class="">Hello,</div>
<div class=""><br class="">
</div>
I’m using nginx 1.10.3 custom built on Ubuntu 16.04. I’m also using the
recommended systemd service file:
<div class=""><br class="">
</div>
<div class="">
<div class=""><font class="" face="Courier">[Unit]</font></div>
<div class=""><font class="" face="Courier">Description=The NGINX HTTP
and reverse proxy server</font></div>
<div class=""><font class="" face="Courier">After=syslog.target
network.target remote-fs.target nss-lookup.target</font></div>
<div class=""><font class="" face="Courier"><br class="">
</font></div>
<div class=""><font class="" face="Courier">[Service]</font></div>
<div class=""><font class="" face="Courier">Type=forking</font></div>
<div class=""><font class="" face="Courier">PIDFile=/run/nginx.pid</font></div>
<div class=""><font class="" face="Courier">ExecStartPre=/usr/sbin/nginx
-t</font></div>
<div class=""><font class="" face="Courier">ExecStart=/usr/sbin/nginx</font></div>
<div class=""><font class="" face="Courier">ExecReload=/bin/kill -s HUP
$MAINPID</font></div>
<div class=""><font class="" face="Courier">ExecStop=/bin/kill -s QUIT
$MAINPID</font></div>
<div class=""><font class="" face="Courier">PrivateTmp=true</font></div>
<div class=""><font class="" face="Courier"><br class="">
</font></div>
<div class=""><font class="" face="Courier">[Install]</font></div>
<div class=""><font class="" face="Courier">WantedBy=multi-user.target</font></div>
</div>
<div class=""><br class="">
</div>
<div class="">I’m try to do a no downtime upgrade with the USR2 and
WINCH signals. Here is my process list before:</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><font class="" face="Courier">root 32277 0.0 0.4
1056672 71148 ? Ss 21:51 0:00 nginx: master process
/usr/local/nginx/sbin/nginx</font></div>
<div class=""><font class="" face="Courier">www 32278 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32279 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32280 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32281 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32282 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32283 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32288 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32289 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32290 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32291 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32292 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32293 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32294 0.0 0.4
1056672 72212 ? S 21:51 0:00 \_ nginx: cache manager process</font></div>
</div>
<div class=""><br class="">
</div>
<div class="">and here it is after sending USR2:</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><font class="" face="Courier">root 32277 0.0 0.4
1056672 71868 ? Ss 21:51 0:00 nginx: master process
/usr/local/nginx/sbin/nginx</font></div>
<div class=""><font class="" face="Courier">www 32278 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32279 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32280 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32281 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32282 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32283 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32288 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32289 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32290 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32291 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32292 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32293 0.0 0.4
1057924 73152 ? S< 21:51 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32294 0.0 0.4
1056672 72212 ? S 21:51 0:00 \_ nginx: cache manager process</font></div>
<div class=""><font class="" face="Courier">root 32461 5.5 0.5
1056676 82316 ? S 22:01 0:00 \_ nginx: master process
/usr/local/nginx/sbin/nginx</font></div>
<div class=""><font class="" face="Courier">www 32465 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32466 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32467 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32468 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32469 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32470 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32471 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32472 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32473 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32474 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32475 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32476 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32477 0.0 0.4
1056676 72176 ? S 22:01 0:00 \_ nginx: cache manager
process</font></div>
<div class=""><font class="" face="Courier">www 32478 0.0 0.4
1056676 72176 ? S 22:01 0:00 \_ nginx: cache loader
process</font></div>
</div>
<div class=""><br class="">
</div>
<div class="">Notice how the new master is a child of the old master.
If I send a WINCH I get:</div>
<div class=""><br class="">
</div>
<div class="">
<div class=""><font class="" face="Courier">root 32277 0.0 0.4
1056672 71868 ? Ss 21:51 0:00 nginx: master process
/usr/local/nginx/sbin/nginx</font></div>
<div class=""><font class="" face="Courier">root 32461 0.2 0.5
1056676 82316 ? S 22:01 0:00 \_ nginx: master process
/usr/local/nginx/sbin/nginx</font></div>
<div class=""><font class="" face="Courier">www 32465 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32466 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32467 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32468 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32469 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32470 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32471 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32472 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32473 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32474 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32475 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32476 0.0 0.4
1057928 73052 ? S< 22:01 0:00 \_ nginx: worker process</font></div>
<div class=""><font class="" face="Courier">www 32477 0.0 0.4
1056676 72176 ? S 22:01 0:00 \_ nginx: cache manager
process</font></div>
<div class=""><font class="" face="Courier">www 32478 0.0 0.4
1056676 72176 ? S 22:01 0:00 \_ nginx: cache loader
process</font></div>
</div>
<div class=""><br class="">
</div>
<div class="">which is not what I’m looking for. Is this a limitation
when running with systemd?</div>
<div class=""><br class="">
</div>
<div class="">Thanks,</div>
<div class="">Marc</div>
</div>
</div></blockquote>
</span></span>
</div>
_______________________________________________<br class="">nginx
mailing list<br class=""><a moz-do-not-send="true"
href="mailto:nginx@nginx.org" class="">nginx@nginx.org</a><br class=""><a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></div></blockquote></div><br
class=""></div></div>
<pre wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></pre>
</blockquote>
<br>
</body></html>