Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Thu Sep 22, 2011 12:38 pm 
Offline
Junior Member
User avatar

Joined: Wed Oct 20, 2010 7:10 pm
Posts: 36
Location: Sebastopol, CA
Hi,

I was wondering if anyone can point me to documentation describing when the Apache 2 access log is written. Is it before or after the request is handled?

The reason I ask is that I use Pingdom to check my website and have been experiencing increasing response times with their service, and then suddenly two days ago it dropped back down to a more reasonable level. I noticed in the access log when they said it two 3 seconds for a response, my log said it was 3 seconds after they said they tried. Does this mean it took 3 seconds for Apache to start working on the request or 3 seconds to complete the request?

Thanks, Josh


Top
   
 Post subject:
PostPosted: Thu Sep 22, 2011 1:05 pm 
Offline
Senior Member
User avatar

Joined: Tue Jan 04, 2005 7:32 am
Posts: 277
Website: http://www.betadome.com/
Location: Ă…lesund, Norway
Skype: neonnero
Twitter: neonnero
I can't immediately point to any detailed information about this at the moment, but based on information that can go into the log file (including the returned HTTP status code and bytes served in the response, as well as the fact that conditional log configurations can include certain files, request types, source IP addresses, etc), I'd say it's logical to assume that information to the log file is written once the request has been served.

Here's a list of possible fields that can be used in a LogFormat configuration statement, though:
http://httpd.apache.org/docs/2.2/mod/mo ... ml#formats


Top
   
 Post subject:
PostPosted: Thu Sep 22, 2011 5:18 pm 
Offline
Senior Member
User avatar

Joined: Sat Aug 30, 2008 1:55 pm
Posts: 1739
Location: Rochester, New York
Yup, it's after the request is done. You can test this by whipping up a CGI script that sleeps for 10 seconds. I don't know where it's documented, but I haven't seen a web server (or any server, really...) operate differently.

_________________
Code:
/* TODO: need to add signature to posts */


Top
   
 Post subject:
PostPosted: Thu Sep 22, 2011 6:57 pm 
Offline
Senior Member

Joined: Mon Dec 07, 2009 6:46 am
Posts: 331
Yes, logged after request, that's why slowloris can't be detected via logs.


Top
   
 Post subject:
PostPosted: Fri Sep 23, 2011 12:44 am 
Offline
Junior Member
User avatar

Joined: Wed Oct 20, 2010 7:10 pm
Posts: 36
Location: Sebastopol, CA
Thanks everyone.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group