Re: Apache dies silently from log-rotate !?

From: Craig Orsinger (nospam.cjorsinger_at_earthlink_net.invalid)
Date: 06/26/04


Date: Sat, 26 Jun 2004 00:15:13 GMT

On Sun, 28 Dec 2003 02:27:22 +0800, Uwe Dippel wrote:

> My Apache-logs overflowed until I added them into newsyslog to be rotated.
>
> Now, at the time of rotation, I have to notice that Apache dies silently:
>
> [Sun Dec 28 00:00:02 2003] [notice] SIGUSR1 received. Doing graceful restart
> Syntax error on line 199 of /conf/httpd.conf:
> Cannot load /usr/lib/apache/modules/mod_rewrite.so into server: Can't open file
>
> It needed some apachectl start to go back to work.
> At first I thought I'd been hacked, but no, this coincides with log rotate
> and there is no single trace of hacking. Strange enough, that module is
> readily available. Only at SIGUSR1 it seems missing.
>
> Can someone confirm this behaviour ?

        On my linux systems, logrotate's script for apache sends the
main server process a SIGHUP ("kill -HUP `cat /var/run/httpd.pid`")
after changing out the logs. Apache version is 1.3.27 on one
system and 2.0.47 on the other. I think it's safe to assume that
you will have to do something similar.



Relevant Pages

  • Re: Apache dies silently from log-rotate !?
    ... > Now, at the time of rotation, I have to notice that Apache dies silently: ... > At first I thought I'd been hacked, but no, this coincides with log rotate ... Only at SIGUSR1 it seems missing. ... Apache version is 1.3.27 on one ...
    (comp.unix.bsd.openbsd.misc)
  • Re: Logrotate is a pain
    ... > apache is doing the rotation. ... rotation", none said httpd itself would rotate the logs. ... We're on Token Ring, ...
    (comp.os.linux.misc)
  • Re: newsyslog and apache
    ... any other util recommendations that rotate hundreds of ... Have you tried using the internal rotation code in apache? ...
    (freebsd-questions)
  • RE: Apache log rotation question...
    ... Cronolog basically takes care of the logging for apache, allowing you much more flexibility with the logging options. ... For the record, I want weekly rotation on Sundays at midnight (I assume JST, ...
    (freebsd-questions)