Difference between revisions of "This Is Your Brain On Informatics: NGINX and Large Files"

From Pathology Education Instructional Resource
Jump to: navigation, search
(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...")
 
Line 4: Line 4:
 
<p>
 
<p>
 
* ''client_max_body_size'''
 
* ''client_max_body_size'''
 
+
<br />
 
If you've done the setup as in the blog, this parameter should be located in  
 
If you've done the setup as in the blog, this parameter should be located in  
  
Line 10: Line 10:
  
 
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).
 
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>
+
</p>
  
 
===Server Timing Parameters===
 
===Server Timing Parameters===
Line 18: Line 18:
 
* ''keepalive_timeout''
 
* ''keepalive_timeout''
 
* ''send_timeout''
 
* ''send_timeout''
 +
<br />
  
 
These parameters should be in the same file as the size parameters.
 
These parameters should be in the same file as the size parameters.
Line 28: Line 29:
 
===FastCGI Parameters===
 
===FastCGI Parameters===
 
<p>
 
<p>
* fastcgi_read_timeout
+
* ''fastcgi_read_timeout''
 +
<br />
  
 
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.
 
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>
 
</p>

Revision as of 01:56, 18 January 2014

Need-to-know NGINX Parameters for Large Files

Size Parameters

  • client_max_body_size'


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

/etc/nginx/nginx.conf

This parameter controls the size of a file that is allowed to be passed through 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).

Server Timing Parameters

  • client_header_timeout
  • client_body_timeout
  • keepalive_timeout
  • send_timeout


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

/etc/nginx/nginx.conf

Each one of these modifies how long 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.

FastCGI Parameters

  • 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.