[plug] logging incomplete downloads in Apache

James Devenish devenish at guild.uwa.edu.au
Mon Apr 19 07:03:20 WST 2004


In message <1082304076.6734.58.camel at albert.localnet>
on Mon, Apr 19, 2004 at 12:01:16AM +0800, Craig Ringer wrote:
> I was wondering ... does anyone here know of a way to get Apache to log
> downloads that are not completed? The POST is currently serving up some
> large PDFs, and while we're getting lots of _hits_, I don't know how
> many of those are prematurely terminated.

Firstly: how do you define "downloads that are not completed"? For
instance, it is possible to download only portions of a linearised PDF
(i.e. grab only pages of interest) without downloading the entire file.
But for general static content, as Cameron says, the first thing that
pops to mind is to use the information that's probably already there
(i.e. number of bytes sent). If you can define clearly what a "completed
download" entails, you may have other options, too. If you want to look
for "overly long" requests, you could also take a look at the log column
that shows how many seconds the request took. You could then use a data
analysis programme to draw a histogram and display the corresponding log
entries. Also, Apache can log the mode of connection termination. For
example, the %X directive in Apache 2 or the %c directive in Apache 1
can indicate "X" for a connection that was aborted before the response
was completed. This might or might not be a good indicator, depending on
the nature of your content.





More information about the plug mailing list