Solved

Apache Log files not Updated

Posted on 2001-07-24
6
194 Views
Last Modified: 2010-03-18

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
Comment
Question by:u4
6 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6312190
how do you know that they are not updated?
0
 

Author Comment

by:u4
ID: 6313025

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
 
LVL 3

Expert Comment

by:interiot
ID: 6313155
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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 3

Accepted Solution

by:
tdaoud earned 300 total points
ID: 6313275

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
 
LVL 51

Expert Comment

by:ahoffmann
ID: 6313689
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
 

Author Comment

by:u4
ID: 6316136

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

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question