• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 206
  • Last Modified:

Apache Log files not Updated


Dear Experts,

I have apache with some virtual web pages.  I noticed that some of these web pages log files don't get updated somtimes.  I'm not when and how.

Your help is appreciated.
0
u4
Asked:
u4
1 Solution
 
ahoffmannCommented:
how do you know that they are not updated?
0
 
u4Author Commented:

I was going into some of these files to see who is visiting my web pages and asking for which files, and I noticed once that it should have logged myself since I just viewed the page and it did not do so.  Then I on purpose browsed the page again and then no logging.  As if the logging stopped at certain time while the web server is up and running.  at other times I would find that it is logging and sometimes it stops logging, then it goes back to logging at certain point, I'm not sure when, why and/or how.

I know this sounds strange but it is what I'm getting.
0
 
interiotCommented:
I've gotten the same thing before.  They way I knew is I was had tcpdump running, logging all incoming SYN packets and all outgoing SYN.ack packets.  Tcpdump was reporting www connections being made, but apache was not.

(This was on the evening of the Code Red Worm attacks, BTW)
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
tdaoudCommented:

Do you edit the logfiles by hand?  Do you save if you edit your log files in an editor say "vi"?

If you edit any of your logfiles by hand and save afterwards, Apache will stop logging to that file (I'm not sure why....it maybe a security related feature that I don't know about).

I found out that since I moved to RedHat 7.1 that comes with it Apache 1.3.19

In the past I sometimes would edit my logfiles to remove certain logs that I made while testing my web page.  It used to continue logging afterwards, but now with apache 1.3.19, it is not doing the same anymore, and I have to restart httpd everytime I do edit a logfile...but I stopped editing such logfiles for the sake of it.  If I ever do, I will remember to restart httpd.

Hope that helps explain your problem if it is similar to what I faced.

Good Luck,

Tarik
0
 
ahoffmannCommented:
logging is delayed, usually. Means that the file will be flushed to disk every 8kb or so. So you do not see the messages immedeately, but if the (8k) buffer is flushed.
(the size of the buffer depends on kernel settings)
0
 
u4Author Commented:

Thanks a lot.

After several testing, that is exactly what I'm doing wrong.  I noticed on several tests that if I edit one of the logfiles and do a save in the editor, it stops logging to that file while other logfiles are still updated.

Abe
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now