Nginx proxy truncates large file downloads to 1.1G

Maxim Dounin mdounin at
Wed Sep 14 07:53:20 UTC 2011


On Wed, Sep 14, 2011 at 08:57:28AM +0200, JAZZ F. wrote:

> Even i am facing the same problem but i m yet to figure out the exact 
> cause of it.....The disk space seems to be fine.....In my case when 
> downloading a file larger than 1G(1.2 GB) it will truncate to 1 GB...

proxy_max_temp_file_size, when reached, causes relative long delay 
in reading from upstream server; this may cause timeout on 
upstream server, seen as "truncation".

There are 3 possible workarounds:

1. Use smaller proxy_max_temp_file_size to reduce delay in 

2. Use larger proxy_max_temp_file_size to avoid hitting it.

3. Use larger timeout on upstream server.

Maxim Dounin

More information about the nginx mailing list