Restart Apache and Kill All Sub Processes

apache-2.2init.d

I am trying to restart Apache on my server but it does not seem to kill all the processes that Apache is currently running.

The command I am using is

sudo /etc/init.d/apache2 restart

Is there something else I should be doing that will kill all the child processes too?

Thanks

Josh Pennington

Best Answer

The child processes should stop as soon as they finish handling their current requests. Do you really want your server drop connections in the middle of serving a page? The restarted server will handle all new connections, as it has taken over listening for new connections.

Check after a minute or so to ensure that the children of the old server have died. If they are still running then you likely have a problem.