[Bug 112991] [NEW] /etc/init.d/apache2 greps excessively for PidFile

Launchpad Bug Tracker 112991 at bugs.launchpad.net
Thu Feb 17 09:16:04 UTC 2011


You have been subscribed to a public bug by Daniel Holbach (dholbach):

Binary package hint: apache2

/etc/init.d/apache2 does a "grep ^PidFile /etc/apache2/* -r".  It is not
uncommon for there to exist a symlink from /etc/apache2/logs to
/var/log/apache2: this causes that invocation of grep to scan through
all of Apache's log files.  On my web server there are several gigabytes
of these, causing "/etc/init.d/apache2 stop" during shutdown to take a
very long time.

I suggest not following symlinks, for starters, using something like
this instead perhaps:

find /etc/apache2/ -type f -print0 | xargs -0 grep ^PidFile

Or ideally being more intelligent about which files to look at, e.g.
*.conf...

** Affects: apache2 (Ubuntu)
     Importance: Medium
     Assignee: Ubuntu Server Team (ubuntu-server)
         Status: Fix Released

** Affects: apache2 (Debian)
     Importance: Unknown
         Status: Fix Released


** Tags: patch
-- 
/etc/init.d/apache2 greps excessively for PidFile
https://bugs.launchpad.net/bugs/112991
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is a direct subscriber.




More information about the Ubuntu-sponsors mailing list