From nobody Fri Jul 21 08:44:31 2023 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R6jmC64ysz4pR1K for ; Fri, 21 Jul 2023 08:44:43 +0000 (UTC) (envelope-from peo@nethead.se) Received: from ns1.nethead.se (ns1.nethead.se [5.150.237.139]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (P-384) client-digest SHA384) (Client CN "ns1.nethead.se", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R6jmB4f0Mz4Cxp for ; Fri, 21 Jul 2023 08:44:42 +0000 (UTC) (envelope-from peo@nethead.se) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=nethead.se header.s=NETHEADSE header.b=BHO7LrX7; spf=pass (mx1.freebsd.org: domain of peo@nethead.se designates 5.150.237.139 as permitted sender) smtp.mailfrom=peo@nethead.se; dmarc=pass (policy=none) header.from=nethead.se X-Virus-Scanned: amavisd-new at Nethead AB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nethead.se; s=NETHEADSE; t=1689929074; bh=20kPsFBJLEOWU4D1nZyXI9eTdl+XdeUmygbfDDd/jP8=; h=Date:Subject:To:References:From:In-Reply-To; b=BHO7LrX7aR1EFV2t9jhhlxO92wl0EVKLwxj75kiE91CTETun9l2ekq2+ZS0sJlE17 a9vzAWUrE1+MUyARkpTcliHIfZ8/pvU7y6LsGSAA5uAnyhzw8FRYlVM5VlBCejEblz wVe4wlA/2tyjx6GpV51R7ftuXHzYL4EEGl8aAJmQ= Message-ID: <460694e6-44f7-d639-69b0-bb5c76416485@nethead.se> Date: Fri, 21 Jul 2023 10:44:31 +0200 List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Apache log rotation Content-Language: en-US To: Robert Fitzpatrick , FreeBSD References: From: Per olof Ljungmark In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spamd-Result: default: False [-3.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.95)[-0.949]; DMARC_POLICY_ALLOW(-0.50)[nethead.se,none]; R_SPF_ALLOW(-0.20)[+ip4:5.150.237.139]; R_DKIM_ALLOW(-0.20)[nethead.se:s=NETHEADSE]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[nethead.se:+]; ASN(0.00)[asn:8473, ipnet:5.150.192.0/18, country:SE]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[] X-Rspamd-Queue-Id: 4R6jmB4f0Mz4Cxp X-Spamd-Bar: --- On 2023-07-16 21:07, Robert Fitzpatrick wrote: > Ever since I upgraded from FreeBSD 13.1 to 13.2, each week when the > logrotate happens for my Apache logs, apache dies. I see this in the log... > > Jul 16 02:00:00 sites kernel: pid 84639 (httpd), jid 0, uid 0: exited on > signal 11 (core dumped) > > If I use gdb on the core output file, I get no stack... > > root@sites:~ # gdb /httpd.core > (gdb) bt > No stack. > > My suspicion after looking around, is this happens during log rotation > since it happens exactly at 2am each Sunday morning. I have my logs > listed in newsyslog.conf as this .... > > /var/log/httpd-access.log               644  14    *    $W0D2  JC > /var/run/httpd.pid 30 > /var/log/httpd-error.log                        644  14    *    $W0D2 JC > /var/run/httpd.pid 30 > > This has worked for a long time up until the last 4 weeks, ever since I > upgraded FreeBSD to 13.2 only from 13.1 and all packages using pkg. Not > sure where I got the idea for 30 for the sig num, I see posts now > suggesting this should be 1? Appreciate any help to determine what needs > changed or how to track down the issue. Are there other ways to rotate > apache logs? > Hi Robert, This happened to us because we had forgotten to remove mod_php and for each update the port placed a reference to LoadModule php_module libexec/apache24/libphp.so We use php-fpm so mod_php is not needed and should be removed. Just my $0.02 Per