Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is

sudo /etc/init.d/apache2 reload

interrupting the operations on the webservers hosted by apache ?

share|improve this question
add comment

1 Answer 1

up vote 10 down vote accepted

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.

share|improve this answer
    
ok. So, more precisely, if my customer is performing an order on a php based e-shop. If i reload apache without restarting, is he going to have issues ? thanks –  Patrick Sep 26 '10 at 7:59
    
Again in theory, as long as the customer order is handled in one php call, and as long as the reload is not critical for the correct functioning of "old generation" servers, then all will pass gracefully and well. But it's easy enough to test in practice. –  harrymc Sep 26 '10 at 8:25
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.