flask + nginx + uwsgi_response_sendfile_do() TIMEOUT
You should set the uwsgi_max_temp_file_size
setting according to the documentation:
When buffering of responses from the uwsgi server is enabled, and the whole response does not fit into the buffers set by the uwsgi_buffer_size and uwsgi_buffers directives, a part of the response can be saved to a temporary file. This directive sets the maximum size of the temporary file. The size of data written to the temporary file at a time is set by the uwsgi_temp_file_write_size directive.
The default value for this setting is 1024 MB.