Welcome! Log In Create A New Profile

Advanced

Re: Windows Nginx Network Sharing (Mapped Hard Drive) Issue

Maxim Dounin
January 20, 2016 12:08PM
Hello!

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 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.

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
(http://nginx.org/r/dav_methods):

: 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 Dounin
http://nginx.org/

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Windows Nginx Network Sharing (Mapped Hard Drive) Issue

c0nw0nk January 18, 2016 08:54AM

Re: Windows Nginx Network Sharing (Mapped Hard Drive) Issue

Maxim Dounin January 20, 2016 12:08PM

Re: Windows Nginx Network Sharing (Mapped Hard Drive) Issue

c0nw0nk January 20, 2016 02:20PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 173
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready