Mercurial > hg > nginx-site
annotate xml/en/docs/control.xml @ 585:e83b551cb90e
Documented what WINCH signal does when sent to a worker process.
author | Ruslan Ermilov <ru@nginx.com> |
---|---|
date | Thu, 12 Jul 2012 05:04:37 +0000 |
parents | be54c443235a |
children | 764fbac1b8b4 |
rev | line source |
---|---|
580
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
1 <!-- |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
2 Copyright (C) Igor Sysoev |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
3 Copyright (C) Nginx, Inc. |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
4 --> |
be54c443235a
Added copyright markers to documentation sources.
Ruslan Ermilov <ru@nginx.com>
parents:
461
diff
changeset
|
5 |
186
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
6 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
7 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
8 <article name="Controlling nginx" |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
9 link="/en/docs/control.html" |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
10 lang="en"> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
11 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
12 <section> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
13 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
14 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
15 nginx can be controlled with signals. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
16 The process ID of the master process is written to the file |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
17 <path>/usr/local/nginx/logs/nginx.pid</path> by default. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
18 This name may be changed at configuration time, or in |
288 | 19 <path>nginx.conf</path> using the |
186
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
20 <link doc="ngx_core_module.xml" id="pid"/> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
21 directive. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
22 The master process supports the following signals: |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
23 <note> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
24 <table> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
25 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
26 <tr><td width="20%">TERM, INT</td><td>fast shutdown</td></tr> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
27 <tr><td width="20%">QUIT</td><td>graceful shutdown</td></tr> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
28 <tr><td width="20%">HUP</td><td>changing configuration, |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
29 keeping up with a changed time zone (only for FreeBSD and Linux), |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
30 starting new worker processes with a new configuration, |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
31 graceful shutdown of old worker processes</td></tr> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
32 <tr><td width="20%">USR1</td><td>re-opening log files</td></tr> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
33 <tr><td width="20%">USR2</td><td>upgrading an executable file</td></tr> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
34 <tr><td width="20%">WINCH</td><td>graceful shutdown of worker processes</td></tr> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
35 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
36 </table> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
37 </note> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
38 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
39 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
40 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
41 Individual worker processes can be controlled with signals as well, |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
42 though it is not required. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
43 The supported signals are: |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
44 <note> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
45 <table> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
46 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
47 <tr><td width="20%">TERM, INT</td><td>fast shutdown</td></tr> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
48 <tr><td width="20%">QUIT</td><td>graceful shutdown</td></tr> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
49 <tr><td width="20%">USR1</td><td>re-opening log files</td></tr> |
585
e83b551cb90e
Documented what WINCH signal does when sent to a worker process.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
50 <tr><td width="20%">WINCH</td><td>abnormal termination for debugging |
e83b551cb90e
Documented what WINCH signal does when sent to a worker process.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
51 (requires <link doc="ngx_core_module.xml" id="debug_points"/> to be enabled) |
e83b551cb90e
Documented what WINCH signal does when sent to a worker process.
Ruslan Ermilov <ru@nginx.com>
parents:
580
diff
changeset
|
52 </td></tr> |
186
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
53 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
54 </table> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
55 </note> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
56 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
57 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
58 </section> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
59 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
60 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
61 <section id="reconfiguration" name="Changing Configuration"> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
62 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
63 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
64 In order for nginx to re-read the configuration file, a HUP |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
65 signal should be sent to the master process. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
66 The master process first checks the syntax validity, then tries |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
67 to apply new configuration, that is, to open log files and new |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
68 listen sockets. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
69 If this fails, it rolls back changes and continues to work |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
70 with old configuration. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
71 If this succeeds, it starts new worker processes, and |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
72 sends messages to old worker processes requesting them to |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
73 shut down gracefully. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
74 Old worker processes close listen sockets and continue to service |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
75 old clients. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
76 After all clients are serviced, old worker processes are shut down. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
77 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
78 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
79 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
80 Let's illustrate this by example. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
81 Imagine that nginx is run on FreeBSD 4.x and the command |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
82 <programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
83 ps ax -o pid,ppid,user,%cpu,vsz,wchan,command | egrep '(nginx|PID)' |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
84 </programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
85 produces the following output: |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
86 <programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
87 PID PPID USER %CPU VSZ WCHAN COMMAND |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
88 33126 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
89 33127 33126 nobody 0.0 1380 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
90 33128 33126 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
91 33129 33126 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
92 </programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
93 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
94 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
95 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
96 If HUP is sent to the master process, the output becomes: |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
97 <programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
98 PID PPID USER %CPU VSZ WCHAN COMMAND |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
99 33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
100 33129 33126 nobody 0.0 1380 kqread nginx: worker process is shutting down (n |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
101 33134 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
102 33135 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
103 33136 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
104 </programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
105 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
106 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
107 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
108 One of the old worker processes with PID 33129 still continues to work. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
109 After some time it exits: |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
110 <programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
111 PID PPID USER %CPU VSZ WCHAN COMMAND |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
112 33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
113 33134 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
114 33135 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
115 33136 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
116 </programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
117 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
118 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
119 </section> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
120 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
121 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
122 <section id="logs" name="Rotating Log-files"> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
123 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
124 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
125 In order to rotate log files, they need to be renamed first. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
126 After that USR1 signal should be sent to the master process. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
127 The master process will then re-open all currently open log files and |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
128 assign them an unprivileged user under which the worker processes |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
129 are running, as an owner. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
130 After successful re-opening, the master process closes all open files and |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
131 sends the message to worker process to ask them to re-open files. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
132 Worker processes also open new files and close old files right away. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
133 As a result, old files are almost immediately available for post |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
134 processing, such as compression. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
135 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
136 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
137 </section> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
138 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
139 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
140 <section id="upgrade" name="Upgrading Executable on the Fly"> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
141 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
142 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
143 In order to upgrade the server executable, the new executable file |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
144 should be put in place of an old file first. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
145 After that USR2 signal should be sent to the master process. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
146 The master process first renames its file with the process ID to a |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
147 new file with the <path>.oldbin</path> suffix, e.g. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
148 <path>/usr/local/nginx/logs/nginx.pid.oldbin</path>, |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
149 then starts a new executable file that in turn starts new |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
150 worker processes: |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
151 <programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
152 PID PPID USER %CPU VSZ WCHAN COMMAND |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
153 33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
154 33134 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
155 33135 33126 nobody 0.0 1380 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
156 33136 33126 nobody 0.0 1368 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
157 36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
158 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
159 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
160 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
161 </programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
162 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
163 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
164 <!-- |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
165 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
166 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
167 The process 36264 with a new executable file creates its own file |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
168 with the <path>.newbin</path> suffix that will keep the process ID, |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
169 e.g. <path>/usr/local/nginx/logs/nginx.pid.newbin</path>. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
170 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
171 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
172 --> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
173 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
174 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
175 After that all worker processes (old and new ones) continue to accept requests. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
176 If the WINCH signal is sent to the first master process, it will |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
177 send messages to its worker processes, requesting them to shut |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
178 down gracefully, and they will start to exit: |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
179 <programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
180 PID PPID USER %CPU VSZ WCHAN COMMAND |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
181 33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
182 33135 33126 nobody 0.0 1380 kqread nginx: worker process is shutting down (n |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
183 36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
184 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
185 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
186 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
187 </programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
188 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
189 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
190 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
191 <note> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
192 When using the “rtsig” method on Linux, the new processes may not accept |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
193 connections even after the old master process was sent the WINCH signal. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
194 If that is the case, the USR1 signal should be sent to the new master |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
195 process continuously, until the new processes start to accept connections. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
196 </note> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
197 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
198 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
199 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
200 After some time, only the new worker processes will process requests: |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
201 <programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
202 PID PPID USER %CPU VSZ WCHAN COMMAND |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
203 33126 1 root 0.0 1164 pause nginx: master process /usr/local/nginx/sb |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
204 36264 33126 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
205 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
206 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
207 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
208 </programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
209 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
210 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
211 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
212 It should be noted that the old master process does not close its listen |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
213 sockets, and it can be managed to start its worker processes again if needed. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
214 If for some reason the new executable file works unacceptably, the following |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
215 can be done: |
461 | 216 <list type="bullet"> |
186
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
217 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
218 <listitem> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
219 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
220 Send the HUP signal to the old master process. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
221 The old process will start new worker processes without re-reading the |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
222 configuration. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
223 After that, new processes can be shut down gracefully, by sending |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
224 their master process the QUIT signal. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
225 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
226 </listitem> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
227 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
228 <listitem> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
229 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
230 Send the TERM signal to the new master process, it will then send a |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
231 message to its worker processes requesting them to exit immediately, |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
232 and they will all exit almost immediately. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
233 When the new master process exits, the old master process will start new |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
234 worker processes. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
235 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
236 </listitem> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
237 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
238 <listitem> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
239 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
240 If new processes do not exit, the KILL signal should be sent to them. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
241 When the new master process exits, the old master process will start new |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
242 worker processes. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
243 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
244 </listitem> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
245 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
246 </list> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
247 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
248 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
249 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
250 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
251 If the new master process exits then the old master process discards |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
252 the <path>.oldbin</path> suffix from the file name with the process ID. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
253 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
254 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
255 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
256 If upgrade was successful, then the old master process can be sent |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
257 the QUIT signal, and only new processes will stay: |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
258 <programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
259 PID PPID USER %CPU VSZ WCHAN COMMAND |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
260 36264 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
261 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
262 36266 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
263 36267 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
264 </programlisting> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
265 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
266 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
267 <!-- |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
268 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
269 <para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
270 To complete the upgrade process, the |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
271 <path>/usr/local/nginx/logs/nginx.pid.newbin</path> file should be renamed to |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
272 <path>/usr/local/nginx/logs/nginx.pid</path>. |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
273 </para> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
274 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
275 --> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
276 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
277 </section> |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
278 |
abc48ad4b7c4
Translated the "Controlling nginx" article into English.
Ruslan Ermilov <ru@nginx.com>
parents:
diff
changeset
|
279 </article> |