1

I have a webapp running on some servers that have their Apache log files on an OCFS2 SAN volume. The internal webapp logging is done using log4perl, in pipe mode, with cronolog on the other end of the pipe to handle log file rotation. From time to time, right around midnight, when the log files are rotated, some of the servers will experience a broken pipe, which renders Apache unable to log, and generates all sorts of alerts and bad things.

I'm wondering if there is a way to determine the root cause of the pipe breaking. DTrace sounds like it could do it, with some clever programming, but I'm not sure.

Anyone have any ideas?

Thanks,

Kendall

1 Answer 1

1

My guess is that if chronolog is logging the broken pipe then it's possible you have logrotate or some other rotator competing with it. logrotate rotates apache's logs by having it close and reopen its log files (which makes it create new files after logrotate has moved the old ones), which could break the pipe. You might try apache2ctl graceful (this is what logrotate uses in debian, your distribution may vary) to see if this is what is triggering the condition.

1
  • I think that could be a possibility. The machines also have logrotate installed, and have cron files in /etc/cron.daily. I suppose the broken pipe issue could be coming up on the occasions when cronolog and logrotate buttheads --as you mention. I haven't yet been able to test your theory, but I'm putting the answer as accepted. Thank you :)
    – Kendall
    Apr 28, 2011 at 18:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .