<div dir="ltr">Kill old processes first, then start new processes.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 24, 2018 at 11:13 AM, <span dir="ltr"><<a href="mailto:he.hailong5@zte.com.cn" target="_blank">he.hailong5@zte.com.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="m_-775651883278554492zcontentRow"><p style="font-size:14px;font-family:arial">Hi,<br></p><p style="font-size:14px;font-family:arial">I have a script runs two successive reloads, the first one is to remove a listen port from the stream block, and the second one is to add the same port back to the <span style="font-family:arial;line-height:21px">stream block. It is observed that most time the script would run into "bind() xxxx failed, Address already in use" error. After putting a sleep 1 in between these two reloads I never get that error again. </span></p><p style="font-size:14px;font-family:arial"><span style="font-family:arial;line-height:21px">So I guess the listening socket was not released in the time the second reload was issued? </span></p><p style="font-size:14px;font-family:arial"><span style="font-family:arial;line-height:21px">How the <span style="font-family:arial;line-height:21px">listening socket is getting released during reload?</span></span></p><p style="font-size:14px;font-family:arial"><span style="font-family:arial;line-height:21px"><span style="font-family:arial;line-height:21px">In this case, how to ensure that we can safely trigger the second reload other than sleep?</span></span></p><p style="font-size:14px;font-family:arial"><span style="font-family:arial;line-height:21px"><span style="font-family:arial;line-height:21px"><br></span></span></p><p style="font-size:14px;font-family:arial">br,</p><p style="font-size:14px;font-family:arial">Allen</p><p style="font-size:14px;font-family:arial"><span style="font-family:arial;line-height:21px"><br></span></p><p style="font-size:14px;font-family:arial"><br></p><p style="font-size:14px;font-family:arial"><br></p><p style="font-size:14px;font-family:arial"><br></p><p style="font-size:14px;line-height:normal"><span style="font-size:14px;color:#58595b;font-family:微软雅黑;font-size:14px"><span><span class="m_-775651883278554492signedit"><br></span></span></span></p><p style="font-size:14px;line-height:normal"><span style="font-size:14px;color:#58595b;font-family:微软雅黑;font-size:14px"></span></p><span style="line-height:normal;font-size:14px;color:#58595b;font-size:10px"></span></div><br>______________________________<wbr>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" rel="noreferrer" target="_blank">http://mailman.nginx.org/<wbr>mailman/listinfo/nginx</a><br></blockquote></div><br></div>