Windows Nginx Network Sharing (Mapped Hard Drive) Issue
nginx-forum at forum.nginx.org
Wed Jan 20 19:20:07 UTC 2016
Maxim Dounin Wrote:
> On Mon, Jan 18, 2016 at 08:54:42AM -0500, c0nw0nk wrote:
> > 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
> > 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
> > the file onto the storage server. So if i was to try and get Nginx
> > respond to any connection or request it will sit in the connecting
> > 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
> : 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
> Maxim Dounin
> nginx mailing list
> nginx at nginx.org
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: https://forum.nginx.org/read.php?2,263995,264027#msg-264027
More information about the nginx