[PATCH] Core: configurable listening try number

Maxim Dounin mdounin at mdounin.ru
Mon Apr 7 17:06:32 UTC 2014


Hello!

On Mon, Apr 07, 2014 at 11:44:18PM +0800, Han Cheng wrote:

> Hello, Maxim,
> 
> As I'm new to nginx, please point out if I'm wrong.
> 
> The reason why we should have multiply tries is we may fail when we bind().
> That is because the address and port
> are in use(temporary which  caused by unclean close or others, permanent
> like another nginx is using) or others.
> 
> In the temporary use case, we may wait and retry. Configurable retry make
> us more probable succeed in that case.

While in theory this may be usefull when, e.g., switching from 
other servers to nginx, it's not something expected to happen 
during normal operation.  Because of this there is no real need to 
configure retries - if nginx fails to start because previously 
working server isn't stopped in time, administrator will be able 
to start nginx again.  And if this happens for some reason during 
normal operation, probably the problem is anyway fatal and retries 
won't help.

-- 
Maxim Dounin
http://nginx.org/



More information about the nginx-devel mailing list