Welcome to WebmasterWorld Guest from 54.159.189.139

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Can a apache access log and error log have too many entries?

too many entries access log

     
8:12 am on Oct 26, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Oct 20, 2009
posts:70
votes: 0


Hi guys,
I started using ajax on my site to update a clock. This updates every second.

Can Access logs get so large that they not only take up space, but also slow the server?

I thought it might because in php fopen a large file will result in a slower script.

Well, thank you anyone for anyone's input. Just curious.

8:22 am on Oct 26, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


I'd rotate the logs daily or weekly instead of monthly to keep the individual file sizes down.
8:26 am on Oct 26, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Oct 20, 2009
posts:70
votes: 0


Is it possible to make apache store them in mysql?
11:23 am on Oct 26, 2009 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 17, 2002
posts:1187
votes: 6


Do you really need to log the ajax requests? You can set apache to not log specific locations as well as .js, .css files etc.

Here is an example:

SetEnvIf Request_URI "(\.gif¦\.jpg¦\.png¦\.css¦\.js)$" no_log
SetEnvIf Request_URI "/ajax/" no_log
SetEnvIf Request_URI "/jquery/" no_log
CustomLog /var/log/mysite_access_log "%a %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %T %v \"%{x-forwarded-for}i\"\"%{CLIENT-IP}i\"" env=!no_log

12:07 pm on Oct 26, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Oct 20, 2009
posts:70
votes: 0


Ohh wow. i didn't know that. That will be really helpful! I'll be trying it out, later.

Thank you Fran_Rizzo and g1smd for your suggestions and input.

12:10 pm on Oct 26, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Oct 20, 2009
posts:70
votes: 0


For everyone who stubbles on this thread...i thought of a simple concept of adding logs into mysql.

My server is a WAMP (more like a WIMP ... miss Linux), I was going to create a bat file that would read the logs every 24 hours and turn them into sql to be injected into my mysql db.

Either that or just delete them after a week. They tend to climb up there in size really fast due to visits and I think the ajax requests.

Any comments?

7:57 pm on Oct 26, 2009 (gmt 0)

Junior Member

5+ Year Member

joined:Oct 20, 2009
posts:70
votes: 0


Hey guys, is there a way to disable the logs completely? I only use them when I'm testing codes. Would this be a bad idea?
 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members