Changes

Jump to: navigation, search

This Is Your Brain On Informatics: NGINX and Large Files

1,549 bytes added, 01:54, 18 January 2014
Created page with "==Need-to-know NGINX Parameters for Large Files== ===Size Parameters=== <p> * ''client_max_body_size''' If you've done the setup as in the blog, this parameter should be loc..."
==Need-to-know NGINX Parameters for Large Files==

===Size Parameters===
<p>
* ''client_max_body_size'''

If you've done the setup as in the blog, this parameter should be located in

<pre>/etc/nginx/nginx.conf</pre>

This parameter controls the size of a file that is allowed to be passed through [[This Is Your Brain On Informatics: NGINX|NGINX]]. If a file that is passed to the server is too large, an error of 413 (or something similar will result). The way to fix that is to change the size of the file that is allowed to be passed to a larger number. The letter ''k'' is for kilobytes and ''m'' is for megabytes (you should not be passing gigabytes to your poor overworked server).
<p>

===Server Timing Parameters===
<p>
* ''client_header_timeout''
* ''client_body_timeout''
* ''keepalive_timeout''
* ''send_timeout''

These parameters should be in the same file as the size parameters.

<pre>/etc/nginx/nginx.conf</pre>

Each one of these modifies how long [[This Is Your Brain On Informatics: NGINX|NGINX]] will deal with part of the process for uploading a file. Suffice it to say, that if your file upload is somehow timing out, these parameters need to be increased in order to allow the file to take its time in uploading.
</p>

===FastCGI Parameters===
<p>
* fastcgi_read_timeout

This parameter will only work with something that is using FastCGI (like PHP, or another language). It is what allows CGI to keep processing the uploaded file. Again, if the uploaded file is timing out. This parameter needs to be increased.
</p>
347
edits

Navigation menu