Strange behaviour in logging files and log rotatation, hopefully an easy answer?
debian at herakles.homelinux.org
Tue May 17 23:17:50 UTC 2005
Bob Brennan wrote:
> I host some relatively steady volume virtual domains and in order to
> keep the log access files to a reasonable size I logrotate them once
> every night and only keep 10 days worth. The logrotate works fine with
> .3 .4 .5 etc
> happening as expected, the problem is that only one of those files
> receives the log information, even as it's name changes! So typically
> access_log.1, .2, .3 for instance are all 0b while .4 continues to
> grow into the megabytes until it is deleted.
> Any help/pointers/ideas greatly appreciated, I can't even think what to google.
Many years ago, when I was setting up RHL 3.0.3 or so, I read the
instructions for rotating Apache logs.
On *x you can rename files while they're open and that's what you're
doing. Changing the file's name does not affect rw operations for
technical reasons I won't go into beyond noting that the name of a file
is not its real identifier, just as a host name is not the real
identifier for a computer - both are aliases that have to be converted
What you need to do is make Apache reopen its files, and this is
accomplished by the various reload/restart options.
1aaaaaaa at computerdatasafe.com.au Z1aaaaaaa at computerdatasafe.com.au
Tourist pics http://portgeographe.environmentaldisasters.cds.merseine.nu/
More information about the users