Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?



share|improve this question
up vote 0 down vote accepted

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.

share|improve this answer
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 '11 at 18:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.