Mercurial > hg > nginx-site
changeset 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 | f563967a4f59 |
children | d1b5814e5265 |
files | xml/en/docs/control.xml xml/ru/docs/control.xml |
diffstat | 2 files changed, 30 insertions(+), 37 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/docs/control.xml +++ b/xml/en/docs/control.xml @@ -8,7 +8,7 @@ <article name="Controlling nginx" link="/en/docs/control.html" lang="en" - rev="1"> + rev="2"> <section> @@ -212,35 +212,29 @@ 36267 36264 nobody 0.0 1364 kqread ng <para> It should be noted that the old master process does not close its listen sockets, and it can be managed to start its worker processes again if needed. -If for some reason the new executable file works unacceptably, the following -can be done: +If for some reason the new executable file works unacceptably, one of the +following can be done: <list type="bullet"> <listitem> <para> Send the HUP signal to the old master process. -The old process will start new worker processes without re-reading the -configuration. -After that, new processes can be shut down gracefully, by sending -their master process the QUIT signal. +The old master process will start new worker processes +without re-reading the configuration. +After that, all new processes can be shut down gracefully, +by sending the QUIT signal to the old master process. </para> </listitem> <listitem> <para> -Send the TERM signal to the new master process, it will then send a -message to its worker processes requesting them to exit immediately, -and they will all exit almost immediately. +Send the TERM signal to the new master process. +It will then send a message to its worker processes requesting them +to exit immediately, and they will all exit almost immediately. +If the new worker processes do not exit for some reason, +the KILL signal should be sent to them. When the new master process exits, the old master process will start new -worker processes. -</para> -</listitem> - -<listitem> -<para> -If new processes do not exit, the KILL signal should be sent to them. -When the new master process exits, the old master process will start new -worker processes. +worker processes automatically. </para> </listitem> @@ -254,7 +248,7 @@ the <path>.oldbin</path> suffix from the </para> <para> -If upgrade was successful, then the old master process can be sent +If upgrade was successful, then the old master process should be sent the QUIT signal, and only new processes will stay: <programlisting> PID PPID USER %CPU VSZ WCHAN COMMAND
--- a/xml/ru/docs/control.xml +++ b/xml/ru/docs/control.xml @@ -8,7 +8,7 @@ <article name="Управление nginx" link="/ru/docs/control.html" lang="ru" - rev="1"> + rev="2"> <section> @@ -204,29 +204,28 @@ 36267 36264 nobody 0.0 1364 kqread ng Нужно заметить, что старый процесс не закрывает свои listen сокеты и при необходимости ему можно сказать, чтобы он снова запустил свои рабочие процессы. Если работа нового исполняемого файла по каким-то причинам не устраивает, -то можно сделать следующее: +можно проделать одно из следующих действий: <list type="bullet"> <listitem> <para> -Послать старому главному процессу сигнал HUP. Старый процесс, не перечитывая -конфигурации, запустит новые рабочие процессы. После этого можно -плавно завершить новые процессы, послав их главному процессу QUIT. +Послать старому главному процессу сигнал HUP. +Старый главный процесс, не перечитывая конфигурации, +запустит новые рабочие процессы. +После этого можно плавно завершить все новые процессы, +послав старому главному процессу сигнал QUIT. </para> </listitem> <listitem> <para> -Послать новому главному процессу сигнал TERM, он пошлёт сообщение о -немедленном выходе рабочим процессам и все они практически сразу же завершатся. -По выходу нового главного процесса старый запустит новые рабочие процессы. -</para> -</listitem> - -<listitem> -<para> -Если же новые процессы не завершаются, то нужно послать им сигнал KILL. -По выходу нового главного процесса старый запустит свои рабочие процессы. +Послать новому главному процессу сигнал TERM. +В ответ на это он пошлёт сообщение о немедленном выходе своим +рабочим процессам, и все они практически сразу же завершатся. +Если новые рабочие процессы по каким-то причинам не завершаются, +нужно послать им сигнал KILL. +По завершению нового главного процесса старый главный процесс +автоматически запустит новые рабочие процессы. </para> </listitem> @@ -235,13 +234,13 @@ 36267 36264 nobody 0.0 1364 kqread ng </para> <para> -Если новый главный процесс выходит, то старый процесс убирает +Если новый главный процесс выходит, то старый главный процесс убирает суффикс <path>.oldbin</path> из имени файла с номером процесса. </para> <para> Если же обновление прошло удачно, то старому процессу нужно послать сигнал -QUIT, и у нас остаются только новые процессы: +QUIT, и останутся только новые процессы: <programlisting> PID PPID USER %CPU VSZ WCHAN COMMAND 36264 1 root 0.0 1148 pause nginx: master process /usr/local/nginx/sb