Quick successive reload makes "bind () xxxx failed, Address already in use" error

方坤 quinefang at gmail.com
Wed Jan 24 03:15:25 UTC 2018


Kill old processes first, then start new processes.

On Wed, Jan 24, 2018 at 11:13 AM, <he.hailong5 at zte.com.cn> wrote:

> Hi,
>
> 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.
>
> So I guess the listening socket was not released in the time the second
> reload was issued?
>
> How the listening socket is getting released during reload?
>
> In this case, how to ensure that we can safely trigger the second reload
> other than sleep?
>
>
> br,
>
> Allen
>
>
>
>
>
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20180124/5d17d575/attachment.html>


More information about the nginx mailing list