[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Apache dies every Sunday, 6:00am



On Fri, Jan 17, 2003 at 06:33:40PM -0600, Dave Sherohman wrote:
> Now hold on just a second, there, cowboy...  Is apache _dying_ or is
> it _restarting_?  If you go to http://yourbox.com/ at 6:30 on Sunday
> morning, do you get a response?

No. And there are no Apache processes running. I have to manually
start apache everytime.

> If not, then we have to figure out why the restart fails and the log
> messages after the ones you posted are the place to start looking.

It starts a new log, and starts with this:

[Sun Jan  5 13:52:10 2003] [warn] pid file /var/run/apache.pid
overwritten -- Unclean shutdown of previous Apache run?
[Sun Jan  5 13:52:11 2003] [notice] Apache/1.3.26 (Unix) Debian
GNU/Linux mod_ssl/2.8.9 OpenSSL/0.9.6g PHP/4.1.2 configured --
resuming normal operations
[Sun Jan  5 13:52:11 2003] [notice] suEXEC mechanism enabled (wrapper:
/usr/lib/apache/suexec)
[Sun Jan  5 13:52:11 2003] [notice] Accept mutex: sysvsem (Default:
sysvsem)

That was when I first caught apache not running on the 5th of Jan.

> Telling apache to do a graceful restart is the standard way of
> getting it to (among other things) close and reopen its log files.  A
> process tracks open files by using a file descriptor, which points at
> a location on the disk, not at a file name.  If logrotate just moved
> access.log to access.log.0, apache would continue writing to the same
> _file_ rather than the same _file name_ - the new access.log would
> remain empty and all new log messages would be written to
> access.log.0.  This would defeat the purpose of rotating the logs,
> so, after moving the old log file, apache is told to restart so that
> it will start writing to the new one.

After a log is rotated, logrotate suggests restarting any service that
"belongs" to the log. It seems to work fine on 4 other boxes, and this
one is the only one that fails. The only difference is that this box
runs sarge and the others are woody. I have searched the bug reports
for both apache and logrotate, and have not found any results that
match.



Reply to: