From fce2cdce7f8d80bd29f3501e0f51beb2d56906fa Mon Sep 17 00:00:00 2001 From: mehdi Date: Sat, 8 Apr 2017 18:27:52 +0200 Subject: [PATCH] Adding proxy_max_temp_file_size 0 to nginx config. Explanation: When proxying an HTTP request, nginx first fills up the memory buffers (set by proxy_buffer_size and proxy_buffers). When these are full, it then writes them to a temporary file in batches of proxy_temp_file_write_size until it reaches proxy_max_temp_file_size. When proxy_max_temp_file_size is not set, and a very large file is being served, it reaches the maximum of 1GB, and nginx begins to behave weirdly. --- setup/start/nginx/appconfig.ejs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup/start/nginx/appconfig.ejs b/setup/start/nginx/appconfig.ejs index 24b7660fe..bc0045df2 100644 --- a/setup/start/nginx/appconfig.ejs +++ b/setup/start/nginx/appconfig.ejs @@ -76,6 +76,9 @@ server { proxy_buffers 4 256k; proxy_busy_buffers_size 256k; + # No buffering to temp files, it fails for large downloads + proxy_max_temp_file_size 0; + # Disable check to allow unlimited body sizes client_max_body_size 0;