When you have meny virtual hosts apache can take a while to shut down causing the restart script to start apache again before apache has properly shut down. This is almost a non-issue for most people, but alas, there are always those who would like things to happen correctly. Reproducible: Sometimes Steps to Reproduce: 1. /etc/init.d/apache2 restart 2. 3. Actual Results: It doesn't always actually restart apache, complaining about port 80 being in use. Expected Results: Should have waited for apache to shut down properly and then start apache again Portage 2.0.49-r20 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r9, 2.6.1) ================================================================= System uname: 2.6.1 i686 AMD Duron(tm) processor Gentoo Base System version 1.4.3.10p1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon -Os -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /opt/tomcat/conf /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=athlon -Os -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache sandbox" GENTOO_MIRRORS="http://ftp.up.ac.za/mirrors/gentoo.org/gentoo ftp://ftp.is.co.za/linux/distributions/gentoo http://gentoo.oregonstate.edu/ http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://ftp.up.ac.za/gentoo-portage" USE="X apm arts avi berkdb cdr crypt cups encode esd foomaticdb gdbm gif gpm gtk gtk2 imlib java jpeg kde libg++ libwww mad mikmod motif mozilla mpeg mysql ncurses nls oggvorbis opengl pam pdflib perl png python qt quicktime readline sdl slang spell ssl svga tcltk tcpd truetype x86 xml2 xmms xv zlib"
Created attachment 24581 [details, diff] fix for apache restart problem The above should fix it (well, permitting apache doesn't take more than 5 seconds to shut down - I've never seen this). Also, why are we using start-stop-daemon in the first place when a utility like apache2ctl already exists to do all this for us? I mean, in start you can simply call apache2ctl start, in stop apache2ctl stop, the same applies to restart and reload.
*** This bug has been marked as a duplicate of 29932 ***
I have seen more than a minute on our web server. It all depends on system load...