Can I "reload" Apache2 configuration file without issues?

Is

sudo /etc/init.d/apache2 reload

interrupting the operations on the webservers hosted by apache ?


Solution 1:

Reload does a "Graceful Restart".

From the Apache documentation Stopping and Restarting :

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.

In theory no operations will be interrupted, but there will be a wave of server-processes restarting, with some (normally trivial enough) overhead.

In effect there are more variables involved, such as whether you are using prefork or worker, the number of children that you have specified, and in the case of worker the max threads per child.