Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Does anybody know why Apache might be delaying writing to the all-activity log file? For instance the modified time on the file is 8:01:42 even though I just accessed the site at 13:29:00. If it is in fact delaying, where does it put the data in the meantime?

Thanks

share|improve this question

2 Answers 2

up vote 1 down vote accepted

It's probably not delaying (I'm not sure there's any function which would give that), which means it's not writing to the log you think it is. The other option is the clock on the server is wrong.

share|improve this answer
    
It was actually writing to a different file and what I was seeing was the archived copy. –  Cyrcle Aug 26 '11 at 4:08

Apache may in fact be delaying writing logs. There is a buffer option for logging -- it's not the default behavior, but there is such an option, "buffered logs".

Also, there will usually be normal, every-day buffering happening with writing to files. But you should see your latest log entries popping out after a few minutes (my general estimate) at most.

Finally, are you sure you're looking at the right log file? You should check the config to be sure it's logging where you think; or use your system's open files ("fuser" on most unix flavors) command to make sure a process has the log you're looking at open, and that the process is your web server.

share|improve this answer

Your Answer

 
discard

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.