I am using lighttp 1.5 on CentOS release 5.2. The site is a free stock photo site that allows users to download files. Files are around 3-6MB each. The download script is a php script that looks like this.
set_time_limit(0);
//...
header( "Content-Disposition: attachment; filename=\"" . $title . '"' );
header( "Content-type: image/jpeg");
header( "Content-Length: " . filesize($file));
header( "X-LIGHTTPD-send-file: " . $file);
A description of the problem would be I am downloading 5 or 6 different files at once. One of the files 1/2 way through, will start losing k/per sec till it gets to "downloading at 1k per second" and then it just quits. The image never fully arrives. I retry and the image and it downloads fine, even if it takes 5 minutes. Lots of users are reporting this problem and I noticed it at peak times. Ping shows very low packet loss. Anyone have an idea why the connection just drops? Is it lighty or the network? Any help would be greatly appreciated.