difference between graceful-restart and normal restart

Normal restart
During a normal restart, the server is stopped and then started which means the parent causes it to immediately attempt to kill off all of its children. It may take it several seconds to complete killing off its children. Then the parent itself exits.

for eg.in apache web server
apachectl -k stop/start/restart

Graceful Restart
Graceful signal causes the parent process to advise the children to exit after their current request
Then parent re-reads its configuration files and re-opens its log files.When each child dies off the parent replaces it with a new child and serving new requests immediately.

eg. for a graceful restart in apache web server
apachectl -k graceful

Stop Now
Signal: TERM
apachectl -k stop
Sending the TERM or stop signal to the parent causes it to immediately attempt to kill off all of its children. It may take it several seconds to complete killing off its children. Then the parent itself exits. Any requests in progress are terminated, and no further requests are served.

Graceful Restart
Signal: USR1
apachectl -k graceful
The USR1 or graceful signal causes the parent process to advise the children to exit after their current request (or to exit immediately if they’re not serving anything). The parent re-reads its configuration files and re-opens its log files. As each child dies off the parent replaces it with a child from the new generation of the configuration, which begins serving new requests immediately.

Advertisements

Posted on October 23, 2013, in General, Uncategorized. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: