Welcome! Log In Create A New Profile

Advanced

Re: Subtle differences of restart

Maxim Dounin
March 12, 2013 06:14AM
Hello!

On Mon, Mar 11, 2013 at 04:54:55PM -0400, kalpesh.patel@glgroup.com wrote:

> Hello all:
>
> I had a few subtle question on NGINX operation and in particular are of
> reseading configuration :
>
> -- Assuming NGINX processes are running and the configuration is syntacaly
> valid, what it the difference when '.../nginx -s reload' is executed versus
> 'kill -HUP <pid of master process>' is executed? Is ther any difference in
> the end result and if so what are they?

The "nginx -s reload" requires (otherwise unneeded) parsing of the
configuration file. Otherwise it's just a tricky way to do "kill -HUP ...".
It was introduced mostly for win32 where there is no kill.

> -- Assuming NGINX processes are NOT running and the configuration is
> syntacaly valid, what will '.../nginx -s reload' will do?

It will fail as it won't be able to open pid file.

> -- Assuming NGINX processes are running and the configuration is syntacaly
> valid, what should be used to reread the configuraton from a cron job?

I would recommend using kill.

(Well, actually I wouldn't recommend reloading configuration by
cron, at least without some precautions to prevent situation when
there are too many worker processes shutting down. But I assume
you understand what you are doing.)

--
Maxim Dounin
http://nginx.org/en/donation.html

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Subtle differences of restart

kalpesh.patel@glgroup.com March 11, 2013 04:54PM

Re: Subtle differences of restart

Maxim Dounin March 12, 2013 06:14AM

Re: Subtle differences of restart

kalpesh.patel@glgroup.com March 12, 2013 01:09PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 272
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready