23

Does anyone know if while Apache HTTPD is doing a reload (which, let's say, takes five seconds) can it still serve requests during that time?

Luke
  • 20,878
  • 35
  • 119
  • 178

2 Answers2

38

First of all, you say reload, but assuming you mean 'reload' OR 'restart':

   /my/path/to/httpd restart
  • Causes the current httpd process to exit, which means for a time the server appears to be down, as in not serving any requests.

Reload on the other side:

    /my/path/to/httpd reload
  • Does not cause the current server to exit, which means connections are never refused and thus the server never looks down (but is rather slow for a little while)
  • Will cause all long running httpd daemon requests to exit
kramer65
  • 50,427
  • 120
  • 308
  • 488
karim79
  • 339,989
  • 67
  • 413
  • 406
  • 1
    Hi. Thanks for your answer. Sorry, I didn't mean 'reload' or 'restart'. Just 'reload'. I understand that a 'restart' brings the whole server down. I was just wondering about the 'reload'. – Luke Mar 22 '09 at 22:19
  • No worries, it's better to be clear about the difference between the two anyway. Hope that helped you. – karim79 Mar 22 '09 at 22:22
  • ? http://mail.lon-capa.org/pipermail/lon-capa-admin/2004-July/000606.html ? – Marc Gravell Jul 30 '10 at 05:31
  • 1
    I would like add to this answer, that if you `reload` apache with errors in config file nothing will happen, while if you `restart` apache server it will get down, and could not start because of errors in config file. – Krystian Nov 25 '13 at 22:00
  • "Will cause all long running httpd daemon requests to exit": do you have a source for this? – marcovtwout Sep 29 '15 at 07:33
5

As far as I know, no. However there is a graceful restart which stops child nodes halting mid-request which I think takes care of this.

http://httpd.apache.org/docs/2.2/stopping.html

Ross
  • 46,186
  • 39
  • 120
  • 173