uwsgi_temp_file_write_size

Sets the size of temporary files used for buffered uWSGI responses.

Syntaxuwsgi_temp_file_write_size size;
Default8k
Contexthttp, server, location
Arguments1

Description

The uwsgi_temp_file_write_size directive controls the maximum size of the temporary files NGINX uses to store buffered uWSGI responses. When NGINX processes a response from a uWSGI server, it may need to temporarily write to a file before sending the response to the client. This directive specifies the size limit of those temporary files, which can help to manage disk space and optimize performance based on the expected response sizes from the uWSGI server. It takes a single argument that defines the size in bytes, kilobytes, megabytes, etc., using standard NGINX size suffixes like 'k' for kilobytes and 'm' for megabytes. This directive can be set in the http, server, or location contexts, providing flexibility depending on how granular you want to control temporary file sizes.

Config Example

uwsgi_temp_file_write_size 16k;

Setting the value too low may cause NGINX to frequently write to disk, resulting in performance degradation.

If not set, NGINX defaults to using 8k, which may not be sufficient for larger responses.

← Back to all directives