homepage Welcome to WebmasterWorld Guest from 54.197.15.196
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

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

5+ Year Member



 
Msg#: 4013393 posted 8:12 am on Oct 26, 2009 (gmt 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.

 

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 4013393 posted 8:22 am on Oct 26, 2009 (gmt 0)

I'd rotate the logs daily or weekly instead of monthly to keep the individual file sizes down.

miketheman

5+ Year Member



 
Msg#: 4013393 posted 8:26 am on Oct 26, 2009 (gmt 0)

Is it possible to make apache store them in mysql?

Frank_Rizzo

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4013393 posted 11:23 am on Oct 26, 2009 (gmt 0)

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

miketheman

5+ Year Member



 
Msg#: 4013393 posted 12:07 pm on Oct 26, 2009 (gmt 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.

miketheman

5+ Year Member



 
Msg#: 4013393 posted 12:10 pm on Oct 26, 2009 (gmt 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?

miketheman

5+ Year Member



 
Msg#: 4013393 posted 7:57 pm on Oct 26, 2009 (gmt 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?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved