<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap:break-word;line-break:after-white-space">Hello!<div><br></div><div><p style="font-family:"helvetica Neue",helvetica;font-size:14px">> 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 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. </p><p style="font-family:"helvetica Neue",helvetica;font-size:14px">How does you send “reload” command? Through the nginx -s reload or sending signal to the master process directly?</p><p style="font-family:"helvetica Neue",helvetica;font-size:14px">> So I guess the listening socket was not released in the time the second reload was issued? </p><p style="font-family:"helvetica Neue",helvetica;font-size:14px">> How the listening socket is getting released during reload?</p><p style="font-family:"helvetica Neue",helvetica;font-size:14px">The old unnecessary listening sockets will be closed after nginx master process opens the new listening sockets.</p></div></body></html>