You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Bill Stoddard <st...@raleigh.ibm.com> on 2000/09/07 16:05:21 UTC
Logging aborted connections in the access log
It would be useful to note in the access log when a request has been aborted by
the client. The condition is easy to detect in mod_log_config by checking
r->connection->aborted. I've considered several ways to log the info, none of
which are particularly appealing:
1. Introduce a new LogFormat formatting field, %c, which would spit out a
suitable indicator. " X" if the connection was aborted, "-" otherwise.
2. Tweaking the behavious of the %s format field (%s displays the response
status) thusly.. 200 ==> good response, 200x ==> Good response, but the client
closed the connection before the response could be forwarded. I think this would
break log analysis tools that depend on the status field being three digits, so
probably not a good idea.
3. Tweaking the behavious of the %s format field thusly... 200 ==> good
response, 499 ==> client closed the connection. This has two problems, first is
499 is not an official client error code. Second, we loose the original response
status. I tend to like this one the best though. Perhaps we should create a new
client error code to show this condition?
Thoughts?
Bill
Re: Logging aborted connections in the access log
Posted by James Sutherland <ja...@cam.ac.uk>.
On Thu, 7 Sep 2000, Rodent of Unusual Size wrote:
> Bill Stoddard wrote:
> >
> > Whatever we do should be easily handled by log analysis tools. Thus,
> > I am inclined to use a simple 'cryptic' indicator rather than a
> > mallable text string.
>
> Since the log tools will need editing anyway, I still say let's
> go for flexibility. And greppability as a nice side-effect so
> admins can easily see patterns.
Will they necessarily need changes? If we just tack an extra "*" or "-" or
whatever in the right place, the rest of the line should still be handled
correctly, surely?
James.
Re: Logging aborted connections in the access log
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Bill Stoddard wrote:
>
> Whatever we do should be easily handled by log analysis tools. Thus,
> I am inclined to use a simple 'cryptic' indicator rather than a
> mallable text string.
Since the log tools will need editing anyway, I still say let's
go for flexibility. And greppability as a nice side-effect so
admins can easily see patterns.
--
#ken P-)}
Ken Coar <http://Golux.Com/coar/>
Apache Software Foundation <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed" <http://ApacheUnleashed.Com/>
Re: Logging aborted connections in the access log
Posted by Bill Stoddard <st...@raleigh.ibm.com>.
> Bill Stoddard wrote:
> >
> > 1. Introduce a new LogFormat formatting field, %c, which would
> > spit out a suitable indicator. " X" if the connection was aborted,
> > "-" otherwise.
>
> I like this option best, but "X"/"-" is awfully cryptic. I'd
> prefer something meaningful (and greppable) like "successful"/
> "aborted"/"partial" (for an abort after some content had been
> sent). I think this also has the most flexibility for expansion.
>
Whatever we do should be easily handled by log analysis tools. Thus, I am
inclined to use a simple 'cryptic' indicator rather than a mallable text string.
Bill
Re: Logging aborted connections in the access log
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Manoj Kasichainula wrote:
>
> I prefer to not use words, simply because it's one less thing for
> non-English speakers to want translated.
Ah. The most compelling reason yet. Okey, let's go symbolic.
I still would like the field to be able to have multiple possible
values and not just be a Boolean.
--
#ken P-)}
Ken Coar <http://Golux.Com/coar/>
Apache Software Foundation <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed" <http://ApacheUnleashed.Com/>
RE: Logging aborted connections in the access log
Posted by James Sutherland <ja...@cam.ac.uk>.
On Fri, 8 Sep 2000, William A. Rowe, Jr. wrote:
> > From: James Sutherland [mailto:jas88@cam.ac.uk]
> > Sent: Friday, September 08, 2000 11:30 AM
> >
> > Hrmm... The usual server responses have a nice solution to
> > this - "911 I hate you" or whatever. Both human and both
> > parsable. The trouble is, an explanation of what happened
> > would be a bit too bulky to file, I think, certainly for some uses.
>
> Ok... hot button issue :-) Size alone, 2+ bytes, dictates
> (code, 1+ digits, and space) that we aught to have a simple code
> system, allowing us to see if the request (and connection) were
> terminated (and how, if known.)
Agreed. How about a digit by digit breakdown, as for HTTP status codes?
> > How about supporting both numerical and human result codes,
> > and keeping the two distinct? (i.e. you would get "911"
> > and/or "I hate you", depending on config: readable if you
> > want, fast and compact otherwise.)
>
> Perfectly acceptable, I'd make this case sensistive (caps for any
> logged entry in 'textual' mode, lowercase for any logged 'status'.)
>
> The point? Let's translate -any- code (http status, etc...) for
> the log reader, if the administrator chooses :-)
Good idea. Do we want this done by the httpd on the fly, though?? This
sort of end-user handholding looks more like a job for a post-processor to
me.
James.
RE: Logging aborted connections in the access log
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: James Sutherland [mailto:jas88@cam.ac.uk]
> Sent: Friday, September 08, 2000 11:30 AM
>
> Hrmm... The usual server responses have a nice solution to
> this - "911 I hate you" or whatever. Both human and both
> parsable. The trouble is, an explanation of what happened
> would be a bit too bulky to file, I think, certainly for some uses.
Ok... hot button issue :-) Size alone, 2+ bytes, dictates
(code, 1+ digits, and space) that we aught to have a simple code
system, allowing us to see if the request (and connection) were
terminated (and how, if known.)
> How about supporting both numerical and human result codes,
> and keeping the two distinct? (i.e. you would get "911"
> and/or "I hate you", depending on config: readable if you
> want, fast and compact otherwise.)
Perfectly acceptable, I'd make this case sensistive (caps for any
logged entry in 'textual' mode, lowercase for any logged 'status'.)
The point? Let's translate -any- code (http status, etc...) for
the log reader, if the administrator chooses :-)
Re: Logging aborted connections in the access log
Posted by James Sutherland <ja...@cam.ac.uk>.
On Fri, 8 Sep 2000, Greg Ames wrote:
> "William A. Rowe, Jr." wrote:
> >
> > > From: Manoj Kasichainula [mailto:manoj@io.com]
> > > Sent: Thursday, September 07, 2000 8:50 PM
> > >
> > > On Thu, Sep 07, 2000 at 11:36:18AM -0400, Rodent of Unusual
> > > Size wrote:
> > > > I like this option best, but "X"/"-" is awfully cryptic. I'd
> > > > prefer something meaningful (and greppable) like "successful"/
> > > > "aborted"/"partial" (for an abort after some content had been
> > > > sent). I think this also has the most flexibility for expansion.
> > >
> > > I prefer to not use words, simply because it's one less thing for
> > > non-English speakers to want translated.
> >
> > Good argument for symbology, or perhaps status 'numbered' conditions.
> >
> Eeeeuuw...yuck! Sorry, Manoj and OtherBill, you triggered one of my pet
> peeves left over from my last job.
>
> <Rant>
>
> One group of folks decided that if would make internationalization
> easier if we never attempted to produce English explanations of whatever
> Bad Stuff happened in the software. So we ended up with hexadecimal
> error codes in most of the error messages. Since most humans don't
> speak hexadecimal as a native language, everybody was forced to dig out
> the right manual and look up the error codes whenever they appeared.
> This added a great deal to the aggravation of getting the error in the
> first place. IMO this method wastes everybody's time, no matter what
> language they speak. I think we would be better off attempting to
> explain things in human languages, even if it means additional effort in
> translation.
>
> </Rant>
Hrmm... The usual server responses have a nice solution to this - "911 I
hate you" or whatever. Both human and bot parsable. The trouble is, an
explanation of what happened would be a bit too bulky to file, I think,
certainly for some uses.
How about supporting both numerical and human result codes, and keeping
the two distinct? (i.e. you would get "911" and/or "I hate you", depending
on config: readable if you want, fast and compact otherwise.)
James.
Re: Logging aborted connections in the access log
Posted by Greg Ames <gr...@raleigh.ibm.com>.
"William A. Rowe, Jr." wrote:
>
> > From: Manoj Kasichainula [mailto:manoj@io.com]
> > Sent: Thursday, September 07, 2000 8:50 PM
> >
> > On Thu, Sep 07, 2000 at 11:36:18AM -0400, Rodent of Unusual
> > Size wrote:
> > > I like this option best, but "X"/"-" is awfully cryptic. I'd
> > > prefer something meaningful (and greppable) like "successful"/
> > > "aborted"/"partial" (for an abort after some content had been
> > > sent). I think this also has the most flexibility for expansion.
> >
> > I prefer to not use words, simply because it's one less thing for
> > non-English speakers to want translated.
>
> Good argument for symbology, or perhaps status 'numbered' conditions.
>
Eeeeuuw...yuck! Sorry, Manoj and OtherBill, you triggered one of my pet
peeves left over from my last job.
<Rant>
One group of folks decided that if would make internationalization
easier if we never attempted to produce English explanations of whatever
Bad Stuff happened in the software. So we ended up with hexadecimal
error codes in most of the error messages. Since most humans don't
speak hexadecimal as a native language, everybody was forced to dig out
the right manual and look up the error codes whenever they appeared.
This added a great deal to the aggravation of getting the error in the
first place. IMO this method wastes everybody's time, no matter what
language they speak. I think we would be better off attempting to
explain things in human languages, even if it means additional effort in
translation.
</Rant>
Greg
RE: Logging aborted connections in the access log
Posted by James Sutherland <ja...@cam.ac.uk>.
On Thu, 7 Sep 2000, William A. Rowe, Jr. wrote:
> > From: Manoj Kasichainula [mailto:manoj@io.com]
> > Sent: Thursday, September 07, 2000 8:50 PM
> >
> > On Thu, Sep 07, 2000 at 11:36:18AM -0400, Rodent of Unusual
> > Size wrote:
> > > I like this option best, but "X"/"-" is awfully cryptic. I'd
> > > prefer something meaningful (and greppable) like "successful"/
> > > "aborted"/"partial" (for an abort after some content had been
> > > sent). I think this also has the most flexibility for expansion.
> >
> > I prefer to not use words, simply because it's one less thing for
> > non-English speakers to want translated.
>
> Good argument for symbology, or perhaps status 'numbered' conditions.
>
> One extra thought... would it be useful to log more than one status
> here, now that we are 'inventing' a new concept? I'm thinking about:
>
> Completed - Kept Alive
> Completed - Socket Closed
> Aborted
>
> Anything significant that I'm missing? Excuse a -very- ignorant Q.
> Can we abort and still keep-alive?
Not under HTTP, AFAICS, but we may well be able to in future - later HTTP
revisions, other protocols (FTP can, for example). Keep the option open if
possible, IMO.
How about something akin to HTTP status codes?
2xx = transfer completed
3xx = link error (e.g. socket closed)
4xx = user-commanded abort (e.g. FTP's ABOR command)
5xx = server error (out of memory, signalled)
James.
RE: Logging aborted connections in the access log
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: Manoj Kasichainula [mailto:manoj@io.com]
> Sent: Thursday, September 07, 2000 8:50 PM
>
> On Thu, Sep 07, 2000 at 11:36:18AM -0400, Rodent of Unusual
> Size wrote:
> > I like this option best, but "X"/"-" is awfully cryptic. I'd
> > prefer something meaningful (and greppable) like "successful"/
> > "aborted"/"partial" (for an abort after some content had been
> > sent). I think this also has the most flexibility for expansion.
>
> I prefer to not use words, simply because it's one less thing for
> non-English speakers to want translated.
Good argument for symbology, or perhaps status 'numbered' conditions.
One extra thought... would it be useful to log more than one status
here, now that we are 'inventing' a new concept? I'm thinking about:
Completed - Kept Alive
Completed - Socket Closed
Aborted
Anything significant that I'm missing? Excuse a -very- ignorant Q.
Can we abort and still keep-alive?
Re: Logging aborted connections in the access log
Posted by Manoj Kasichainula <ma...@io.com>.
On Thu, Sep 07, 2000 at 11:36:18AM -0400, Rodent of Unusual Size wrote:
> I like this option best, but "X"/"-" is awfully cryptic. I'd
> prefer something meaningful (and greppable) like "successful"/
> "aborted"/"partial" (for an abort after some content had been
> sent). I think this also has the most flexibility for expansion.
I prefer to not use words, simply because it's one less thing for
non-English speakers to want translated.
Re: Logging aborted connections in the access log
Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Bill Stoddard wrote:
>
> 1. Introduce a new LogFormat formatting field, %c, which would
> spit out a suitable indicator. " X" if the connection was aborted,
> "-" otherwise.
I like this option best, but "X"/"-" is awfully cryptic. I'd
prefer something meaningful (and greppable) like "successful"/
"aborted"/"partial" (for an abort after some content had been
sent). I think this also has the most flexibility for expansion.
> 2. Tweaking the behavious of the %s format field (%s displays the
> response status) thusly.. 200 ==> good response, 200x ==> Good
> response, but the client closed the connection before the
> response could be forwarded.
-1 for the same reason as you stated -- this changes the semantics
of an established format and could introduce breakage.
> 3. Tweaking the behavious of the %s format field thusly...
> 200 ==> good response, 499 ==> client closed the connection.
> This has two problems, first is 499 is not an official client
> error code. Second, we loose the original response status.
-1 for those reasons and the problem with #2.
Any change to the logging format has to be done by adding new
effectors, not by changing the meaning, syntax, nor semantics
of what's already there..
--
#ken P-)}
Ken Coar <http://Golux.Com/coar/>
Apache Software Foundation <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed" <http://ApacheUnleashed.Com/>
Re: Logging aborted connections in the access log
Posted by James Sutherland <ja...@cam.ac.uk>.
On Fri, 8 Sep 2000, Tony Finch wrote:
> "William A. Rowe, Jr." <wr...@rowe-clan.net> wrote:
> >Bill Stoddard <st...@raleigh.ibm.com> wrote:
> >>
> >> 1. Introduce a new LogFormat formatting field, %c, which would spit
> >> out a suitable indicator. " X" if the connection was aborted, "-"
> >> otherwise.
> >
> >I like this, but what about "!", "*" or some other unambigous symbol?
>
> I also like it, but note that using any sort of symbol will be
> ambiguous to some people.
You think 404 or 203 is nice and intuitive? :-)
A nice simple single-character indication seems best to me. Raw logfiles
aren't particularly readable anyway, except to diagnose individual file
problems - the main use for this field will be in log analysers, I expect.
There are other reasons - I18N concerns, space efficiency, performance.
On this subject, though, how about a sort of "logfile interpreter"? A
simple piece of code to expand each line with the meaning of each status
code etc. could be useful, I think?
James.
Re: Logging aborted connections in the access log
Posted by Tony Finch <do...@dotat.at>.
"William A. Rowe, Jr." <wr...@rowe-clan.net> wrote:
>Bill Stoddard <st...@raleigh.ibm.com> wrote:
>>
>> 1. Introduce a new LogFormat formatting field, %c, which would spit
>> out a suitable indicator. " X" if the connection was aborted, "-"
>> otherwise.
>
>I like this, but what about "!", "*" or some other unambigous symbol?
I also like it, but note that using any sort of symbol will be
ambiguous to some people.
Tony.
--
en oeccget g mtcaa f.a.n.finch
v spdlkishrhtewe y dot@dotat.at
eatp o v eiti i d. fanf@covalent.net
Re: Logging aborted connections in the access log
Posted by James Sutherland <ja...@cam.ac.uk>.
On Thu, 7 Sep 2000, Bill Stoddard wrote:
> It would be useful to note in the access log when a request has been
> aborted by the client. The condition is easy to detect in
> mod_log_config by checking r->connection->aborted. I've considered
> several ways to log the info, none of which are particularly
> appealing:
>
> 1. Introduce a new LogFormat formatting field, %c, which would spit out a
> suitable indicator. " X" if the connection was aborted, "-" otherwise.
Good idea.
> 2. Tweaking the behavious of the %s format field (%s displays the
> response status) thusly.. 200 ==> good response, 200x ==> Good
> response, but the client closed the connection before the response
> could be forwarded. I think this would break log analysis tools that
> depend on the status field being three digits, so probably not a good
> idea.
Eurgh! Yep, that would break everything... I have this strange belief that
the status code logged should be the status code :-)
> 3. Tweaking the behavious of the %s format field thusly... 200 ==>
> good response, 499 ==> client closed the connection. This has two
> problems, first is 499 is not an official client error code. Second,
> we loose the original response status. I tend to like this one the
> best though. Perhaps we should create a new client error code to show
> this condition?
Eurgh... Also nasty... If we send the client a 20x response, and the
connection is broken part-way, I want to see a 20x response logged!
I'd prefer option 1. Off-hand, I can't think of any way to change another
field to indicate this without risking some breakage...
James.
Re: Logging aborted connections in the access log
Posted by Scott Hess <sc...@avantgo.com>.
On Thu, 7 Sep 2000, Bill Stoddard wrote:
> It would be useful to note in the access log when a request has been
> aborted by the client.
I completely agree with logging aborted requests, but ... why log the fact
that the request was aborted in the access log? Why not the error log?
Beyond that, when I abort a long request, I currently see it logged with a
status code of 206, "Partial content". Does that apply to any requests
where the entire content was sent?
Later,
scott
RE: Logging aborted connections in the access log
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: James Sutherland [mailto:jas88@cam.ac.uk]
> Sent: Thursday, September 07, 2000 11:46 AM
> To: new-httpd@apache.org
> Subject: Re: Logging aborted connections in the access log
>
> > > > > From: Bill Stoddard [mailto:stoddard@raleigh.ibm.com]
> > > > > Sent: Thursday, September 07, 2000 9:05 AM
> > > > >
> > > > > It would be useful to note in the access log when
> > > > > a request has been aborted by the client. The
> > > > > condition is easy to detect in mod_log_config by checking
> > > > > r->connection->aborted. I've considered several ways to log
> > > > > the info, none of which are particularly appealing:
> > > > >
> > > > > 1. Introduce a new LogFormat formatting field, %c, which would
> > > > > spit out a suitable indicator. " X" if the connection was
> > > > > aborted, "-" otherwise.
> > >
> > > one more thought... we need to assure the size/time factors are passed
> > > on to allow real evaluation of 'walkaways' at slow pages.
>
> I think he wants to distinguish between people who make a request, get
> 0.1K/sec and give up, and those who start a download and get
> cut off for some other reason. Logging bytes transferred and time taken
> should cover this?
Yes...
Just making sure we continue to capture the bytes transfered and request
processing time up to the point the user canceled the connection.
Nothing better for demonstrating to web authors that slow pages=ignored
content :-)
Re: Logging aborted connections in the access log
Posted by James Sutherland <ja...@cam.ac.uk>.
On Thu, 7 Sep 2000, Bill Stoddard wrote:
>
> > > From: William A. Rowe, Jr. [mailto:wrowe@rowe-clan.net]
> > > Sent: Thursday, September 07, 2000 9:38 AM
> > >
> > > > From: Bill Stoddard [mailto:stoddard@raleigh.ibm.com]
> > > > Sent: Thursday, September 07, 2000 9:05 AM
> > > >
> > > > It would be useful to note in the access log when a request
> > > > has been aborted by
> > > > the client. The condition is easy to detect in
> > > > mod_log_config by checking
> > > > r->connection->aborted. I've considered several ways to log
> > > > the info, none of
> > > > which are particularly appealing:
> > > >
> > > > 1. Introduce a new LogFormat formatting field, %c, which
> > > > would spit out a
> > > > suitable indicator. " X" if the connection was aborted, "-"
> > > otherwise.
> > >
> > > I like this, but what about "!", "*" or some other unambigous symbol?
> >
> > one more thought... we need to assure the size/time factors are passed
> > on to allow real evaluation of 'walkaways' at slow pages.
>
> Huh?
I think he wants to distinguish between people who make a request, get
0.1K/sec and give up, and those who start a download and get cut off for
some other reason. Logging bytes transferred and time taken should cover
this?
James.
Re: Logging aborted connections in the access log
Posted by Bill Stoddard <st...@raleigh.ibm.com>.
> > From: William A. Rowe, Jr. [mailto:wrowe@rowe-clan.net]
> > Sent: Thursday, September 07, 2000 9:38 AM
> >
> > > From: Bill Stoddard [mailto:stoddard@raleigh.ibm.com]
> > > Sent: Thursday, September 07, 2000 9:05 AM
> > >
> > > It would be useful to note in the access log when a request
> > > has been aborted by
> > > the client. The condition is easy to detect in
> > > mod_log_config by checking
> > > r->connection->aborted. I've considered several ways to log
> > > the info, none of
> > > which are particularly appealing:
> > >
> > > 1. Introduce a new LogFormat formatting field, %c, which
> > > would spit out a
> > > suitable indicator. " X" if the connection was aborted, "-"
> > otherwise.
> >
> > I like this, but what about "!", "*" or some other unambigous symbol?
>
> one more thought... we need to assure the size/time factors are passed
> on to allow real evaluation of 'walkaways' at slow pages.
Huh?
RE: Logging aborted connections in the access log
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: William A. Rowe, Jr. [mailto:wrowe@rowe-clan.net]
> Sent: Thursday, September 07, 2000 9:38 AM
>
> > From: Bill Stoddard [mailto:stoddard@raleigh.ibm.com]
> > Sent: Thursday, September 07, 2000 9:05 AM
> >
> > It would be useful to note in the access log when a request
> > has been aborted by
> > the client. The condition is easy to detect in
> > mod_log_config by checking
> > r->connection->aborted. I've considered several ways to log
> > the info, none of
> > which are particularly appealing:
> >
> > 1. Introduce a new LogFormat formatting field, %c, which
> > would spit out a
> > suitable indicator. " X" if the connection was aborted, "-"
> otherwise.
>
> I like this, but what about "!", "*" or some other unambigous symbol?
one more thought... we need to assure the size/time factors are passed
on to allow real evaluation of 'walkaways' at slow pages.
RE: Logging aborted connections in the access log
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: Bill Stoddard [mailto:stoddard@raleigh.ibm.com]
> Sent: Thursday, September 07, 2000 9:05 AM
>
> It would be useful to note in the access log when a request
> has been aborted by
> the client. The condition is easy to detect in
> mod_log_config by checking
> r->connection->aborted. I've considered several ways to log
> the info, none of
> which are particularly appealing:
>
> 1. Introduce a new LogFormat formatting field, %c, which
> would spit out a
> suitable indicator. " X" if the connection was aborted, "-" otherwise.
I like this, but what about "!", "*" or some other unambigous symbol?
The others I could pass on, you are correct that we don't want to confound
existing logfile analysis tools. If the user modifies their custom logfile
format, then they can be expected to adjust their logfile analizer
appropriately.