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

2018-01-27 Thread Francis Daly
On Wed, Jan 24, 2018 at 11:13:54AM +0800, he.hailo...@zte.com.cn wrote: Hi there, > 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. Why? If it is "I want to se

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

2018-01-23 Thread he.hailong5
This is the forever loop that it it running in the script for { nginx -s reload //without the port nginx -s reload //with the port } I found there was a transient that both the master process and the newly forked worker were listening the same port, I am not sure if this mgih

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

2018-01-23 Thread oscaretu .
If you search in Google detect a IP port is in use in linux you can find several ways to detect in the port is in use, for Windows and Unix - https://www.cyberciti.biz/faq/unix-linux-check-if-port-is-in-use-command/ - https://askubuntu.com/questions/278448/how-to-know-what-prog

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

2018-01-23 Thread tokers
Hello! > 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() failed, Address already in use" error. A

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

2018-01-23 Thread he.hailong5
The downtime is critical, we cannot take "Kill and Start process"___ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx

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

2018-01-23 Thread 方坤
Kill old processes first, then start new processes. On Wed, Jan 24, 2018 at 11:13 AM, 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 obser

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

2018-01-23 Thread he.hailong5
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() failed, Address already in use" error. Aft