How can the number of parallel/redundant open streams/temp_files be controlled/limited?

Paul Schlie schlie at
Tue Jun 24 18:49:57 UTC 2014

I've noticed that multiple (as great as 8 or more) parallel redundant streams and corresponding temp_files are opened reading the same file from a reverse proxy backend into nginx, upon even a single request by an up-stream client, if not already cached (or stored in a static proxy'ed file) local to nginx.

This seems extremely wasteful of bandwidth between nginx and corresponding reverse proxy backends; does anyone know why this is occurring and how to limit  this behavior?

(For example, upon receiving a request for example small 250MB mp4 video podcast video file, it's not uncommon for 8 parallel streams to be opened, each sourcing (and competing for bandwidth) a corresponding temp_file, where the upstream client appears to being feed by the most complete stream/temp_file; but even upon the compete file being fully transferred to the upstream client,the remaining streams remain active until they too have finished their transfers, and then closed, and their corresponding temp_files deleted. All resulting in 2GB of data being transferred when only 250MB needed be, not to mention that the transfer took nearly 8x longer to complete, so unless there were concerns about the integrity of the connection, it seems like a huge waste of resources?)

Thanks, any insight/assistance would be appreciated.

More information about the nginx mailing list