Welcome! Log In Create A New Profile

Advanced

Spawning of Nginx worker process

Posted by shivramg94 
shivramg94
Spawning of Nginx worker process
April 20, 2017 11:40PM
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
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Maxim Dounin
Re: Spawning of Nginx worker process
April 21, 2017 02:50PM
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
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Sorry, only registered users may post in this forum.

Click here to login