Bug 41887

Summary: -T option unavailable for Apache 2.0.x/2.3.0 -> available
Product: Apache httpd-2 Reporter: Jan van den Berg <janvdberg>
Component: CoreAssignee: Apache HTTPD Bugs Mailing List <bugs>
Severity: enhancement CC: andrew, arekm, xyntrix
Priority: P2 Keywords: FixedInTrunk, PatchAvailable
Version: 2.5-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Attachments: DocumentRoot check option for 2.0.60
DocumentRoot check option for 2.3.0

Description Jan van den Berg 2007-03-19 03:43:12 UTC
Currently when httpd starts or when a graceful command is issued, it does a
DocumentRoot check. When a DocumentRoot doesn't exist; it will produce a warning.
The DocumentRoot check gets its information by 'statting' all the DocumentRoots
from the config file. This check process might take some time depending on the
number of DocumentRoots and the speed of the filesystem.
Imagine the following: mass virtualhosting with 1000's of different
DocumentRoots which are all located on a rather slow NFS mount. This is in fact
my real life setup. 
This causes a problem; when changing the config, you normally like to issue a
graceful restart. However with the number of DocumentRoots on my slow NFS mount
this will take up several minutes, resulting in my server becoming less
responsive/unavailable until the graceful is complete. Wich is *bad*.
So I added an option to the httpd startup. A "-T" commandline argument (which
was also available in 1.3.x). This option will skip the DocumentRoot check and
start the server anyway. In my case this means I can do a graceful restart in a
couple of seconds instead of minutes. So this option has greatly improved my
server performance. 
I've been running my patched up Apache for over a week now: which handles about
50 hits/second and it runs great!
Comment 1 Jan van den Berg 2007-03-19 03:46:01 UTC
Created attachment 19736 [details]
DocumentRoot check option for 2.0.60

This patch for the latest 2.0.x tag will add a commandline option -T; which
specifies whether or not to do a DocumentRoot check when starting httpd.
Comment 2 Jan van den Berg 2007-03-19 07:28:45 UTC
Created attachment 19737 [details]
DocumentRoot check option for 2.3.0

I was advised on the dev-httpd mailinglist (by Nick Kew) to add a patch for the
curren trunk (2.3.0) as well. 
So here it is.
Comment 3 Nick Kew 2009-12-21 15:30:30 UTC
Committed to trunk in r893027
Comment 4 Nick Kew 2009-12-27 03:02:02 UTC
*** Bug 40970 has been marked as a duplicate of this bug. ***
Comment 5 Nick Kew 2010-07-20 09:16:12 UTC
*** Bug 49076 has been marked as a duplicate of this bug. ***
Comment 6 Nick Kew 2010-09-25 05:25:15 UTC
*** Bug 50002 has been marked as a duplicate of this bug. ***
Comment 7 Nick Kew 2010-09-25 05:29:55 UTC
This is now backported in r984171, live in 2.2.17.