Nginx + PHP Windows Network Sharing Uploads locking/slow load time

So i have Nginx as a web server with PHP running as fastcgi what nginx
serves traffic via upstreams.

The strange bug i have encountered is the fact when i upload a large
lets say 2GB and PHP must pass this file to a mapped hard drive via
sharing. PHP/Nginx does not serve traffic to anyone until that
file) has been successfully moved to the mapped hard drive.

Does anyone know why it would be locking up like this or how to solve it
? I
don’t think it is Nginx i think it is just PHP that is locking up. But
it is
a nightmare trying to figure out how to keep it serving traffic since
will be 60-120 seconds while PHP is pushing this file to the mapped hard
drive that no traffic gets served and everyones pages keep loading (they
don’t time out just keep loading / waiting for first byte what is always
sent as soon as the file upload is complete.)

If it helps its latest php builds default production config and
Nginx Build.

Posted at Nginx Forum:,260193,260193#msg-260193

There is a no_buffer option for proxy you could try (see regular manual
correct function name).

Posted at Nginx Forum:,260193,260194#msg-260194

Hi itpp2012 thanks for the swift response :), I am not proxying to PHP
passes the request to the fastcgi upstream Nginx + PHP are both on the
machine just the storage machine (the mapped hard drive) is seperate.

I did look in the docs and find this “fastcgi_buffering off;” And
“proxy_buffering off;”

Is that what you are referring to ?

I will give a go with those directives and reply back if it is fixed or

Posted at Nginx Forum:,260193,260196#msg-260196

Those directives did not fix it.

But i decided to investigate sessions and temporary upload directory of
Now the temporary session directory gave me the same no loading issue
uploads have been moved to the mapped hard drive by php.

But the following seemed to change that and actualy allow me to keep
traffic with uploads being pushed to the mapped hard drive.

Inside PHP.INI

C:/ is the local machine drive where nginx + php is presant.
Z:/ is the external mapped hard drive.

Now i don’t know why that seems to fix it perhaps someone can elaborate

Also it comes at a cost it takes twice as long for a upload to be pushed
a mapped hard drive for some reason like that.

Posted at Nginx Forum:,260193,260202#msg-260202

c0nw0nk Wrote:

I did look in the docs and find this “fastcgi_buffering off;” And
“proxy_buffering off;”

Is that what you are referring to ?

Yea thats it, I knew they were there but couldn’t remember them as fast.

Posted at Nginx Forum:,260193,260197#msg-260197

Sounds like a blocking disk driver issue, look at the driver settings,
dma/pio/caching/advanced sata/etc…
Dynamic content is also best served from a different drive (virtual or
then where nginx is running from.

Posted at Nginx Forum:,260193,260204#msg-260204

Thanks for the information :slight_smile: everything is default though so i am not
what i should even be changing anything to.

On the mapped hard drive “Z:/” it has the settings

Posted at Nginx Forum:,260193,260205#msg-260205

This is expected behavior if you are using PHP sessions.


So its because i’m using PHP’s built in file session handler ? Should i
switch it to maybe Wincache or something ?

Posted at Nginx Forum:,260193,260215#msg-260215

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs