comparison xml/en/docs/control.xml @ 837:6678b1f27514

Improved readability of "Upgrading Executable on the Fly". The old text about what to do if the new executable fails to work properly caused confusion.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 11 Feb 2013 11:44:48 +0400
parents af3f38e349eb
children d1b5814e5265
comparison
equal deleted inserted replaced
836:f563967a4f59 837:6678b1f27514
6 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd"> 6 <!DOCTYPE article SYSTEM "../../../dtd/article.dtd">
7 7
8 <article name="Controlling nginx" 8 <article name="Controlling nginx"
9 link="/en/docs/control.html" 9 link="/en/docs/control.html"
10 lang="en" 10 lang="en"
11 rev="1"> 11 rev="2">
12 12
13 <section> 13 <section>
14 14
15 <para> 15 <para>
16 nginx can be controlled with signals. 16 nginx can be controlled with signals.
210 </para> 210 </para>
211 211
212 <para> 212 <para>
213 It should be noted that the old master process does not close its listen 213 It should be noted that the old master process does not close its listen
214 sockets, and it can be managed to start its worker processes again if needed. 214 sockets, and it can be managed to start its worker processes again if needed.
215 If for some reason the new executable file works unacceptably, the following 215 If for some reason the new executable file works unacceptably, one of the
216 can be done: 216 following can be done:
217 <list type="bullet"> 217 <list type="bullet">
218 218
219 <listitem> 219 <listitem>
220 <para> 220 <para>
221 Send the HUP signal to the old master process. 221 Send the HUP signal to the old master process.
222 The old process will start new worker processes without re-reading the 222 The old master process will start new worker processes
223 configuration. 223 without re-reading the configuration.
224 After that, new processes can be shut down gracefully, by sending 224 After that, all new processes can be shut down gracefully,
225 their master process the QUIT signal. 225 by sending the QUIT signal to the old master process.
226 </para> 226 </para>
227 </listitem> 227 </listitem>
228 228
229 <listitem> 229 <listitem>
230 <para> 230 <para>
231 Send the TERM signal to the new master process, it will then send a 231 Send the TERM signal to the new master process.
232 message to its worker processes requesting them to exit immediately, 232 It will then send a message to its worker processes requesting them
233 and they will all exit almost immediately. 233 to exit immediately, and they will all exit almost immediately.
234 If the new worker processes do not exit for some reason,
235 the KILL signal should be sent to them.
234 When the new master process exits, the old master process will start new 236 When the new master process exits, the old master process will start new
235 worker processes. 237 worker processes automatically.
236 </para>
237 </listitem>
238
239 <listitem>
240 <para>
241 If new processes do not exit, the KILL signal should be sent to them.
242 When the new master process exits, the old master process will start new
243 worker processes.
244 </para> 238 </para>
245 </listitem> 239 </listitem>
246 240
247 </list> 241 </list>
248 242
252 If the new master process exits then the old master process discards 246 If the new master process exits then the old master process discards
253 the <path>.oldbin</path> suffix from the file name with the process ID. 247 the <path>.oldbin</path> suffix from the file name with the process ID.
254 </para> 248 </para>
255 249
256 <para> 250 <para>
257 If upgrade was successful, then the old master process can be sent 251 If upgrade was successful, then the old master process should be sent
258 the QUIT signal, and only new processes will stay: 252 the QUIT signal, and only new processes will stay:
259 <programlisting> 253 <programlisting>
260 PID PPID USER %CPU VSZ WCHAN COMMAND 254 PID PPID USER %CPU VSZ WCHAN COMMAND
261 36264 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb 255 36264 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb
262 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx) 256 36265 36264 nobody 0.0 1364 kqread nginx: worker process (nginx)