Quantcast

request_buffering gotchas?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

request_buffering gotchas?

AjaySawant
Hi!

I'm new to nginx, and working on trying to stream an upload using a
multipart-form through nginx to uwsgi and to my app.  My client posts the
request, and I expect nginx to begin forwarding it on to uwsgi as soon as
data begins coming in...but...no matter what I do, uwsgi is not called until
after the upload buffers in nginx.  The entire upload completes, and \then\
the uwsgi call is made.

I am sure the correct option is

uwsgi_request_buffering off;

...but I'm wondering if there are any other requirements or options that
need to be set, or gotchas that might be thwarting my attempt to make this
work.  It ain't working and I'm at my wit's end.

Thanks in advance for any advice!

~Sean

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274265,274265#msg-274265

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request_buffering gotchas?

Francis Daly
On Tue, May 16, 2017 at 12:49:32PM -0400, sdizazzo wrote:

Hi there,

> My client posts the
> request, and I expect nginx to begin forwarding it on to uwsgi as soon as
> data begins coming in...but...no matter what I do, uwsgi is not called until
> after the upload buffers in nginx.  The entire upload completes, and \then\
> the uwsgi call is made.

http://nginx.org/r/uwsgi_request_buffering includes the line:

"""
When HTTP/1.1 chunked transfer encoding is used to send the original
request body, the request body will be buffered regardless of the
directive value.
"""

Is that relevant in your case?

Can you show a "curl" command which makes the request?

Good luck with it,

        f
--
Francis Daly        [hidden email]
_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: request_buffering gotchas?

AjaySawant
Thanks for your response, Francis!

I don't have complete control over the client (coworker), but inspecting the
header, that was in fact the case.  I tried switching to using proxy_pass
and proxy_request_buffering instead of the uwsgi module, which doesn't have
quite as harsh of a limitation...

"""
When HTTP/1.1 chunked transfer encoding is used to send the original request
body, the request body will be buffered regardless of the directive value
<i>unless HTTP/1.1 is enabled for proxying.</i>
"""

I enabled proxy_http_version 1.1 as the docs suggest, but still no go.  I'll
keep whacking at it for a while before finding another route.  Will post
back if I come up with a working solution.

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,274265,274272#msg-274272

_______________________________________________
nginx mailing list
[hidden email]
http://mailman.nginx.org/mailman/listinfo/nginx
Loading...