Nginx truncate files than 1G

Maxim Dounin mdounin at
Sun Jul 8 09:24:14 UTC 2012


On Sat, Jul 07, 2012 at 08:49:02AM -0400, Adrian Janeczek wrote:

> Hi my nginx truncate files than 1 G

Most likely it's due to your backend closing connection due to 
timeout, as nginx stop receiving response for a while when it hits 
proxy_max_temp_file_size, which is 1G by default.

Possible solutions are:

1. Use lower proxy_max_temp_file_size to avoid timeouts on 
backends.  You may even want to disable disk buffering completely, 
by using "proxy_max_temp_file_size 0;".

2. Use bigger proxy_max_temp_file_size to make sure responses are 
always buffered by nginx.

3. Use bigger timeouts on your backend.

See here for more details:

Maxim Dounin

More information about the nginx mailing list