Re: why is web traffic being written to the rotated log file?

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

 



It sounds like you are using logrotate to rotate your apache logs. The problem is that apache keeps the i-node open when the logrotate tries to roll the logfile. You need to add a graceful restart for apache to roll apache over to the new log file. Let me know if you need the syntax of the command to add to your logrotate (you can also check out /etc/logrotate.d/httpd).

   Alfred Hovdestad, RHCE
   University of Saskatchewan



Chris W. Parker wrote:
Hello,

I've had this problem for a while and have not been able to pinpoint the
cause or determine a frequency. Every once in a while (read, when I
notice) I'll see that what SHOULD be the active web log file is not
being written to and instead the rotated version of the log is being
written to. It's seems like the log rotating process gets interrupted
(or something) and doesn't get a chance to finish so syslog gets
confused and writes to the rotated log file instead of the new log file.

Take this morning for example. I come into the office, check the
webalizer stats for the site and see that the graph has only reported a
small amount of traffic on the 26th and nothing on the 27th or 28th.
Then I check the logs and see that custom_log is at 0 bytes. But what I
also notice is that even though custom_log is 0 bytes, syslog is STILL
writing data to custom_log.1 (all hope is not lost, at least I still
have my data).

So I 'service httpd restart' and see that custom_log is now being
written to and custom_log.1 is no longer being written to.

Fortunately my web traffic is being written to a log file instead of the
log file it should be so it's mostly just an annoyance. But how can I
prevent this or find out what is causing it?

BTW I'm using FC3.


Thanks,
Chris.


--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux