From owner-freebsd-questions@FreeBSD.ORG Fri Oct 3 17:48:05 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0B27C106568A for ; Fri, 3 Oct 2008 17:48:05 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from sola.nimnet.asn.au (paqi.nimnet.asn.au [220.233.188.227]) by mx1.freebsd.org (Postfix) with ESMTP id 4D12E8FC25 for ; Fri, 3 Oct 2008 17:48:03 +0000 (UTC) (envelope-from smithi@nimnet.asn.au) Received: from localhost (localhost [127.0.0.1]) by sola.nimnet.asn.au (8.14.2/8.14.2) with ESMTP id m93Hm1FW083474; Sat, 4 Oct 2008 03:48:02 +1000 (EST) (envelope-from smithi@nimnet.asn.au) Date: Sat, 4 Oct 2008 03:48:01 +1000 (EST) From: Ian Smith To: DA Forsyth In-Reply-To: <20081003114458.0CA75106573F@hub.freebsd.org> Message-ID: <20081004032045.H49572@sola.nimnet.asn.au> References: <20081003114458.0CA75106573F@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: freebsd-questions@freebsd.org Subject: Re: newsyslog and apache X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2008 17:48:05 -0000 On Fri, 03 Oct 2008 10:08:52 +0200 "DA Forsyth" wrote: > On 2 Oct 2008 , freebsd-questions-request@freebsd.org entreated about > "freebsd-questions Digest, Vol 235, Issue 11": I'm replying to the digest too, so threading is doubly screwed :) > > No need to change log rotation software since the problem clearly is > > somewhere else. You need to inspect Apache's error logs to see why it > > cannot start. > > the previous error log shows > [Wed Oct 01 08:00:03 2008] [notice] Graceful restart requested, doing > restart > [Wed Oct 01 08:00:04 2008] [notice] seg fault or similar nasty error > detected in the parent process This is what you need to find and fix. Most likely a config error of some sort .. possibly re some module - php extensions order, maybe? What does 'apachectl configtest' have to say? > the new error log shows, after the manual start > [Wed Oct 01 08:39:09 2008] [warn] pid file /var/run/httpd.pid > overwritten -- Unclean shutdown of previous Apache run? > [Wed Oct 01 08:39:09 2008] [notice] Apache/2.0.63 (FreeBSD) PHP/4.4.9 > with Suhosin-Patch DAV/2 SVN/1.5.2 configured -- resuming normal > operations > > those error messages are repeated any time I do a > apachectl graceful > > However, doing > apachectl stop > apachectlstart > works as expected. See apachectl(8) .. apachectl graceful sends httpd a SIGUSR1, as does your previously mentioned newsyslog line, which shuts apache down but without murdering existing connections, while apachectl restart does. However both graceful and restart run configttest before restarting, and it seems likely that's where/why it's bombing. OTOH, apachectl start doesn't run configtest, maybe explaining why it starts up ok that way? > apache version is apache-2.0.63_2 from ports > uname -a gives > FreeBSD iwr.ru.ac.za 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #2: Mon > Jun 2 13:10:26 SAST 2008 > iwr.ru.ac.za:/usr/obj/usr/src/sys/KERNIWR70 i386 Here running apache 1.3 on 5.5-STABLE, but I doubt the apachectl functionality has changed significantly, though I may be wrong .. > php v4 is installed, though i do plan to upgrade that to V5 as soon > as I get time to do it. Good idea, especially if PHP is related to your apparent config issue. > PS: I used to use logrotate, but it too stopped working correctly, > with apache process stopping in a similar way that is why I changed > to newsyslog. I rotate the logs monthly, and set it to 8am so there > is a chance I'll be on hand to start apache to minimize downtime. Theoretically if it survives an apachectl configtest, you should be good to go - and if it doesn't, neither method will restart apache. cheers, Ian