[plt-scheme] web-server: serving large files

From: Eli Barzilay (eli at barzilay.org)
Date: Wed Dec 15 13:58:24 EST 2004

On Dec 15, Doug Orleans wrote:
> 
> A friend is trying to download a 4M file from my (v299) web server,
> but he says it stalls after about 20% and doesn't ever resume.  I
> can serve the same file with Apache and it works fine, though.  Any
> ideas what might be causing this?

I think that the PLT server does not handle partial file transfers,
which might be causing the problem (the client might stop and ask for
partial content, the server ignores that and starts a normal transfer
from scratch, the client has that content therefore not showing any
progress to the user).


> How would I even go about debugging it?

To see the actual data that goes between network servers and clients I
have a quick Scheme script that sets up a tunnel.  It can be used to
debug (display all data that goes on the line in both directions), and
by default it will slow the line[1].  I'm attaching it below.  Simply
run it and it'll tell you the command line arguments it expects, and
after you do start it, enter "debug" to switch debugging output
on/off, a number to set the delay, and "?" to see what the delay is.

I've put it at http://barzilay.org/tmp/slownet

[1] I initially wrote it to have a speed-controlled tunnel which is
extremely convenient when you move huge files around but still want to
be able to work.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                  http://www.barzilay.org/                 Maze is Life!



Posted on the users mailing list.