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

Re: logrotate.d/apache restart method



Lauren Matheson said:
> > Also, consider this: if Apache had its logfiles rotated but then it was
> > not restarted because the config was broken, then conceivably this could
> > happen again at the next rotation, and those logfiles still being written
> > to by Apache will be compressed (log -> log.0 -> log.1.gz).  After the
> > compress is finished, gzip would unlink the log file, but it would not
> > be removed from the disk because Apache still has it open and is writing
> > to it.  On a busy server with rapidly growing log files, you could then
> > find you've run out of disk because of a log file that is open but does
> > not appear with 'ls' because it has been unlinked from the directory.
> 
> This makes a lot of sense, I'm convinced.  To get around this would mean
> more taking-care-of-the-admin then belongs in a logrotate script.
> 
> Thanks for the explanation.
> -Lauren.

I'm glad I was able to get the idea across.  The situation I described
wasn't the only possible scenario of course.  Just a possible way that
something could go wrong and it wouldn't be obvious as to why ...

There's a really fine line between treating the admin like an idiot and
trying to do everything for them, and doing the absolute minimum to set
up a working installation and give the admin maximum flexibility (and
responsibility).  No matter how hard you strive for the middle ground
there will always be people saying you're leaning too far one way or the
other.  =)

Andrew.

-- 
Andrew Shugg <andrew@neep.com.au>                   http://www.neep.com.au/

"Just remember, Mr Fawlty, there's always someone worse off than yourself."
"Is there?  Well I'd like to meet him.  I could do with a good laugh."



Reply to: