disable request body buffering for file upload
francis at daoine.org
Thu Jul 20 21:11:39 UTC 2017
On Thu, Jul 20, 2017 at 06:36:21AM -0400, garyc wrote:
> With the fastcgi_request_buffering directive set to 'off' the disk space
> reduces by approximately 1.1GB so it does look like the
> fastcgi_request_buffering directive is doing what it should however nginx
> still appears to cache the entire request body before it is proxied to
Why do you think that?
If the problem is nginx buffering when it should not, then the fix should
be on the nginx side. If the problem is something else -- the fastcgi
server or something else doing the buffering -- then time spent changing
nginx is wasted.
Can you find out what is really happening?
For example: change the fastcgi server to listen on a network port;
change nginx to fastcgi_pass to that; and use tcpdump to watch the
traffic involving that port.
Then do a file upload that takes 30 seconds or more.
Does the tcpdump trace show the right amount of traffic going from
nginx to the fastcgi server during that 30 seconds while the upload is
happening? Or does it show no traffic until the upload has completed,
and then lots?
With that information, it may become clear whether the problem can be
fixed in nginx, or whether it must be handled elsewhere.
Good luck with it,
Francis Daly francis at daoine.org
More information about the nginx