httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 50002] New: Restart with many vhosts taking forever [patch]
Date Sat, 25 Sep 2010 09:04:13 GMT

           Summary: Restart with many vhosts taking forever [patch]
           Product: Apache httpd-2
           Version: 2.2.16
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: Core

Created an attachment (id=26073)
 --> (
Patch that kind-of fixes this issue


I've noticed that after adding 10 000 vhosts or more, Apache is taking
abnormally long time to restart. I've ran oprofile when restart was running and
here is where it spent 94% of its time:

It was looking for the last non-null element of a leaf list in directive tree. 

Please note that I know that the patch I'm proposing probably isn't applicable
to mainline source, it's more that I want to indicate that there is a problem.
Anyway, patch description follows:

Because changing the tree structure to some else would break compatibility with
modules, I've decided to address it by extending ap_directive_t with an extra
field, "last".

In the first leaf on a given level, leaf->last keeps a pointer to last known
non-null element. It may not be the last non-null element in that list, but
it's still closer to the end than first element.

It decreased restart time from minutes to several seconds (6 secs for 30k

If you would rather browse source than read patch, it's at

Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message