Randomly stopping large file downloads?

Maxim Dounin mdounin at mdounin.ru
Fri May 20 14:20:56 MSD 2011


On Thu, May 19, 2011 at 04:34:34PM -0400, nickn wrote:

> Hi,
> 1.) What would cause nginx to randomly stop serving large file
> downloads? When I try to download a 800MB file it stops serving the file
> after between 10 and 30 MB. I've had to revert to lighttpd because of
> this.

Are you serving file as static one with nginx, or proxy_pass to 
some backend server?  In later case most likely reason is out of 
space (or no access to) in proxy_temp_path.

> I checked the usual things: There wasn't anything in the error log, the
> system had plenty of memory (several hundred MB free) and the worker
> processes were all still there after the download dies. It doesn't
> matter what browser I use.
> Any idea what would cause this?

Please make sure you have error_log properly configured and you 
are looking at right one.  Most simple aproach is to configure one 
at global level and remove others if any (i.e. at http, server, 
etc. levels), e.g.

error_log /path/to/error.log info;

Note that setting logging level to 'info' may be important in some 
cases (e.g. if nginx thinks client timed out or so on).

If the above wouldn't be enough to solve you problem, please 
follow generic instructions as outlined at 
http://wiki.nginx.org/Debugging, i.e. please provide

1. nginx -V output
2. full nginx config
3. debug log

Maxim Dounin

More information about the nginx mailing list