<div dir="ltr"><div class="gmail_default" style="font-size:small;color:rgb(51,51,153)">Hello,<br></div><div class="gmail_extra"><br><br><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">

On Sat, Aug 17, 2013 at 7:37 AM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

Hello!<br><div><div class="h5"><br>
</div></div>I don't think that calling "nginx -t" as a mandatory step before<br>
configuration reload is a good idea: nginx binary running and<br>
nginx binary on disk might be different, and "nginx -t" result<br>
might be incorrect because of this, in some cases rejecting valid<br>
configurations.<br>
<br>
Additionally, it does duplicate work by parsing/loading a<br>
configuration which will be again parsed by a master process<br>
during configuration reload.  While in most cases it's not<br>
significant, I've seen configurations taking more than 1m to load<br>
due to big geo module bases used.<br></blockquote><div><br><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">​​In that case, the server admin has a problem, since he has no way to test the configuration other the calling 'reload' on the running instance and check the logs for errors, hoping they are not already crawling under production-related log messages...<br>

One way or another, you test the configuration against an existing binary because you want to start or reload this binary with the conf. There is no point in having a running instance having already deleted its disk binary file: If you are in transition between 2​<br>

 <br>​versions of Nginx, you shouldn't also make big changes to the conf... That's a 2-steps procedures I'd say​: One thing at a time.<br><br>Testing conf is of course a duplicate of work, but that's a safe operation. The command output will determine if your new configuration will work without having to carefully watch logs with anxiety.<br>

​</div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
There is the "upgrade" command in the init script shipped with<br>
<a href="http://nginx.org" target="_blank">nginx.org</a> linux packages.<br></blockquote><div><br><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">​​Ok, so could Li have used the 'upgrade' command insted of 'reload' to reload the configuration and change the allocated memory?<br>

​</div> </div>​Thanks,​</div><font size="1"><span style="color:rgb(102,102,102)"><br>---<br></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font>
</div></div>