https://bz.apache.org/bugzilla/show_bug.cgi?id=64066

            Bug ID: 64066
           Summary: httpd slow on startup/reload when many vhosts are
                    configured
           Product: Apache httpd-2
           Version: 2.5-HEAD
          Hardware: PC
                OS: OpenBSD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 36959
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36959&action=edit
Configuration load speed improvement

The httpd(8) startup and "graceful restart" time can be very long (~45s) with a
large amount of vhosts (5k), defeating the purpose of "graceful restart" by
causing client timeouts.
This appears to be the result of many calls to ap_find_command() which searches
for a command by walking a simple array of command_rec structures and doing a
string comparison between the name element of the structure and the desired
command name. 

To reproduce the issue a configuration with at least 5k vhosts is needed;
with a similar config startup is slow and, after sending USR1 signal httpd(8)
becomes unresponsive for many seconds and this can cause client timeouts.

Httpd already has a hash of directives that is builds internally.
As this was most of the startup time we can avoid the manual array search.
For configurations with many directives this reduces the startup time by at
least an order of magnitude.

Bug analysis and patch authored by cPanel.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to