PDA

View Full Version : Large Access_Log ...


devilyellow
Tue 19th Dec '06, 11:47pm
Ok, so I was thinking about the server optimization. And I was thinking of question 13 about the files that are large than 2GB.

Now I never thought much of it until now and now I feel pretty stupid. I looked into it and my Access_log from sunday to today (just tuesday) is 2GB. (rotated logs 5GB+) I was wondering why it took webalizer an hour to process the log! I was looking at the daily log reports and just really confused how I could be using up most of my 70GB drive with an HTML folder that is not more than 2GB.

So I changed it to rotate the logs daily at 4 am (2 hours after webalizer runs) ....

Is it logging things it shouldnt? This the only thing I found in the config that looks like it would command the logging syntax.

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

If it helps, December 1st to the 18th (2.5 weeks) I hosted:
60,657,612 hits
26,008,487 files
9,035,816 pages
635,364 visits
458GB
73,375 different sites/IP's

eva2000
Fri 22nd Dec '06, 5:43am
not sure how you have your log rotation setup but you can probably get your web host to change it so you rotate the logs are smaller sized intervals i.e. once log hits 350-500MB in size

Or if you're heavy on visitor/traffic, some large web sites have found disabling logging completely and use a 3rd party tracking/counter service relieved their server loads tremendously!

devilyellow
Fri 22nd Dec '06, 12:04pm
thanks eva, I swapped it to rotate daily and that free'd up space and dramatically helped with log processing time.

however this was not my problem... and I have found my problem. In my problem thread (http://www.vbulletin.com/forum/showthread.php?t=207240) I practically have tried everything - well I was looking at the wrong box. All this time it was the database server. I edited the my.cnf to skip-name-resolve and all of the sudden its been lighting quick and stable for 48 hours so far.