Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 21 Jul 2023 10:44:31 +0200
From:      Per olof Ljungmark <peo@nethead.se>
To:        Robert Fitzpatrick <robert@webtent.org>, FreeBSD <freebsd-questions@freebsd.org>
Subject:   Re: Apache log rotation
Message-ID:  <460694e6-44f7-d639-69b0-bb5c76416485@nethead.se>
In-Reply-To: <e555269d-4c81-3e18-4079-0caa044fde9b@webtent.org>
References:  <e555269d-4c81-3e18-4079-0caa044fde9b@webtent.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?460694e6-44f7-d639-69b0-bb5c76416485>