Windows Nginx Network Sharing (Mapped Hard Drive) Issue

So i have two machines in different locations.

Web server is C:/

Storage Server is Z:/ (This one is the external mapped hard drive)

Now when you upload files to nginx especialy large files in my tests
2GB.
Nginx then pushes the file from the temp location to the Z drive, The
issue
with this is it locks up and stops serving traffic until it finishes
pushing
the file onto the storage server. So if i was to try and get Nginx to
respond to any connection or request it will sit in the connecting state
until the file has been pushed onto the external machine.

Picture on network connection below. Shows the Internal network
connection
“Local area connection 2” using 12% bandwidth pushing the file to the
mapped
hard drive. And throughout the entire time it is doing this “Local area
connection” (That would serve internet traffic) Stops until the file is
on
the mapped hard drive.

I have also tried the following setting. “client_body_temp_path
Z:/nginx/temp/client_body_temp;” But has the exact same result. Nginx
config
is completely default other than obviously the “client_max_body_size
2G;”.

Nginx Builds i use are http://nginx-win.ecsds.eu/

Screenshot to be helpful :
http://demo.ovh.eu/en/c79e88864393ae948b552f623bbbcb11/

Any help would be much appreciated i get the feeling this is a
completely
unique issue but maybe if anyone else is running tests or using a
similar
setup they can let me know if they have the same problem.

Posted at Nginx Forum:

Hello!

On Mon, Jan 18, 2016 at 08:54:42AM -0500, c0nw0nk wrote:

respond to any connection or request it will sit in the connecting state
until the file has been pushed onto the external machine.

When nginx has to move a file from a temporary location to a
permanent one, this operation will be costly when moving between
filesystems. Moreover, during this operation nginx worker will be
blocked and won’t be able to process any other events.

At least two places in the documentation explicitly warn about
such setups, dav_methods and proxy_cache_path. E.g., the
dav_methods directive description say
(Module ngx_http_dav_module):

: A file uploaded with the PUT method is first written to a
: temporary file, and then the file is renamed. Starting from
: version 0.8.9, temporary files and the persistent store can be put
: on different file systems. However, be aware that in this case a
: file is copied across two file systems instead of the cheap
: renaming operation. It is thus recommended that for any given
: location both saved files and a directory holding temporary files,
: set by the client_body_temp_path directive, are put on the same
: file system.

Additionally, in your paricular setup you are using network
filesystem to save files. This is expected to cause even bigger
problems than usual copy, as network filesystems usually have much
higher latency than local disks. Using network filesystems with
nginx is generally not recommended.

That is, the problem you are seeing is expected with the
configuration you have. Reconsider the configuration you are
using.


Maxim D.
http://nginx.org/

Maxim D. Wrote:

Now when you upload files to nginx especialy large files in my tests

: A file uploaded with the PUT method is first written to a
filesystem to save files. This is expected to cause even bigger
http://nginx.org/


nginx mailing list
[email protected]
nginx Info Page

Thanks for the reply and information.

I also noticed that on the Z:/ machine even though that is just moving
the
uploaded file from the temp location to a permanent one it, It also
locks up
while doing this not for the lengths of time as the other machine the
length
that server stops serving request while pushing temp files is maybe a
second
at max depending on how large the file is.

Posted at Nginx Forum: