Spawning of Nginx worker process

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Spawning of Nginx worker process

Joergi
Hi All,

When we issue a reload to Nginx binary (<binary_location> -s reload), what
are the steps involved inthe spawning of new set of worker processes?

Is it something like, while the older worker processes are still running or
are serving in flight requests, Nginx spawns the newer worker processes and
then brings down the older processes once they have served all the accepted
requests?

Also, is there any chance where one of  the spawned up newer worker
processes after reload, uses the PID of the older/earlier running Nginx
worker process?

Thanks,
Shiv

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,273770,273770#msg-273770

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Spawning of Nginx worker process

Maxim Dounin
Hello!

On Thu, Apr 20, 2017 at 05:31:22PM -0400, shivramg94 wrote:

> Hi All,
>
> When we issue a reload to Nginx binary (<binary_location> -s reload), what
> are the steps involved inthe spawning of new set of worker processes?
>
> Is it something like, while the older worker processes are still running or
> are serving in flight requests, Nginx spawns the newer worker processes and
> then brings down the older processes once they have served all the accepted
> requests?

Yes.  It is documented here:
http://nginx.org/en/docs/control.html#reconfiguration

> Also, is there any chance where one of  the spawned up newer worker
> processes after reload, uses the PID of the older/earlier running Nginx
> worker process?

No, if there is only one configuration reload and by "older" your
mean only the previous set of worker processes.

Yes, as long as there is more than one configuration reload and
"older" includes all previously running worker processes.

--
Maxim Dounin
http://nginx.org/
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Loading...