<div dir="ltr">Get.<div>In production, there may be some possibility with load_module directive.</div><div>1. add new module: load_module modules/some_module.so; [?]</div><div>2. remove exist load_module directive, just comment out. [?]</div><div>3. directive not changed but the so file changed. [kill -USR2 `cat nginx.pid`; sleep 2; kill -QUIT `cat nginx.pid.oldbin`]</div><div>And how to deal with?</div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-28 0:08 GMT+08:00 Igor Sysoev <span dir="ltr"><<a href="mailto:igor@sysoev.ru" target="_blank">igor@sysoev.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><span class="">On 27 Apr 2016, at 18:51, 洪志道 <<a href="mailto:hongzhidao@gmail.com" target="_blank">hongzhidao@gmail.com</a>> wrote:<br></span><div><span class=""><br><blockquote type="cite"><div dir="ltr">Thanks for your reply.<div><br></div><div>Is it the only way to solve the problem?</div></div></blockquote><div><br></div></span><div>This is a way to reload a module in production without service interruption.</div><span class=""><br><blockquote type="cite"><div dir="ltr"><div>I think it will be common that developers try to use dso instead of static module.</div></div></blockquote><div><br></div></span><div>Developers can simply stop and start nginx again.</div><span class=""><div><br></div><div>-- </div><div><div><div style="word-wrap:break-word"><div style="word-wrap:break-word"><div style="word-wrap:break-word">Igor Sysoev<br><a href="http://nginx.com" target="_blank">http://nginx.com</a></div></div></div></div><div><br></div></div><blockquote type="cite"><div dir="ltr"><div>Nginx offical site points out we could load in so modules using reload or restart, but it seems forget to instruct the details about reload.</div><div>And it's a great design, thanks again.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-04-27 19:22 GMT+08:00 Igor Sysoev <span dir="ltr"><<a href="mailto:igor@sysoev.ru" target="_blank">igor@sysoev.ru</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><span>On 27 Apr 2016, at 12:10, 洪志道 <<a href="mailto:hongzhidao@gmail.com" target="_blank">hongzhidao@gmail.com</a>> wrote:<br></span><div><br><blockquote type="cite"><div dir="ltr"><span>Hi,<div><br></div><div>for example following config:</div><div><br></div><div>daemon on;</div><div>...</div><div>load_module modules/ngx_http_test_module.so;</div><div>...</div><div><br></div><div>> start nginx</div><div>> change ngx_http_test_module.c, then regenerate so file</div><div>> kill -HUP pid</div><div><br></div><div>I found nginx still run the old so file (load first time), and how to work with new so file?</div><div><br></div></span><div>I tried .../sbin/nginx -s reload, It works as I expected. It seems there is some differences in 'kill -HUP' and 'sbin/nginx -s reload’;</div></div></blockquote><br></div><div>kill -USR2 `cat nginx.pid`; sleep 2; kill -QUIT `cat nginx.pid.oldbin`</div><span><font color="#888888"><div><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word"><br><br>-- <br>Igor Sysoev<br><a href="http://nginx.com/" target="_blank">http://nginx.com</a></div></div></div>
</div>
</font></span></div></blockquote></div></div></blockquote></span></div><br></div><br>_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br></blockquote></div><br></div>