I have a site with lots of video flv files. My video player requests the flv file with a normal GET request like http://www.mydomain.com/videoname.flv Most the videos are only watched for about 10 seconds, but my apache access logs shows all the flv files as being sent in their full size. My Host is reporting massive traffic usage. here is an entry ion the log showing 20MB was sent. 86.7.72.109 - - [07/Oct/2007:04:58:33 -0400] "GET /video/intro2.flv HTTP/1.1" 200 20037998 My player only shows maximum 30 seconds of the video file and then stops retrieving the file. I can see that on my local traffic monitoring tools. So my assumption is that although my flash flv player in my browser has stop retrieving the flv file, Apache is still serving it out. Can anyone confirm if this is a correct assumption? I am running Apache version 2.0.50 Is there a way I can get Apache to stop sending the file if the browser is no longer receiving it? please help me
I maybe wrong but that looks like the common log format so that last figure is the size of the file + headers. if you want to see how many bytes were actually sent you'll need to change the log format, see here for details: http://httpd.apache.org/docs/2.0/mod/mod_log_config.html
Thanks I believe you're right with the log I need %O to show bytes output which is dependent on modlogio I am no wizz at Apache and I don't think I have that module installed. So really I want to know what does apache do by default when a request is canceled by the user? Does it stop sending or keep sending?
Normally, Apache logs a 206 (Partial content) response code rather than a 200 (OK) response code. Try requesting one of the files with a different grabber, such as curl or wget and stop it partway through. The problem might be that the video player keeps the connection open and keeps getting the rest of the file, even if the user doesn't watch all of it.
You are spot on mate. This is the conclusion I came to. I noticed all the response codes were 200. So I used UV Meter on my PC and noticed that although it appeared the flv player has stopped the buffering, in actual fact it was still downloading the flv file. I have since changed the flv player and will now be saving loads of bandwidth and speeding up my site for users. Had I not found this solution. You post would have made my day, so I am going to give you some great feedback anyway Thanks again.