I’ve probably explained myself wrong. What I want is for nginx to buffer
only chunks of the request body and pass these chunks to the upstream
server as they arrive.
I’ve probably explained myself wrong. What I want is for nginx to buffer only
chunks of the request body and pass these chunks to the upstream server as they
arrive.
Yes, the problem is nginx saves the request body to the local disk on
the nginx server,
filling the disk and making the upload slower.
People want nginx to not save the http PUT/POST request to disk when
using nginx as a reverse proxy.
Are there any plans to integrate this feature into NGINX?
It would be very great.
Maxim D.:
As a non-default mode of operation the aproach taken is likely
good enough (not looked into details), but the patch won’t work
with current nginx versions - at least it needs (likely major)
adjustments to cope with changes introduced during work on chunked
request body support as available in nginx 1.3.9+.
On Thu, Feb 28, 2013 at 10:12:47PM +0400, Maxim D. wrote:
Hello!
Hello,
As a non-default mode of operation the aproach taken is likely
good enough (not looked into details), but the patch won’t work
with current nginx versions - at least it needs (likely major)
adjustments to cope with changes introduced during work on chunked
request body support as available in nginx 1.3.9+.
Weibin: Have you thought of upstreaming the no_buffer patch to nginx
1.3.x
so it could become part of next nginx stable version 1.4 ?
It’d be really nice to have the no_buffer functionality in stock nginx!
(the current no_buffer_v5.patch seems to work OK for me on nginx 1.2.7)
Weibin: Have you thought of upstreaming the no_buffer patch to nginx
1.3.x
so it could become part of next nginx stable version 1.4 ?
It’d be really nice to have the no_buffer functionality in stock nginx!
I agree. Nginx is such an excellent product - but this is a missing
feature.
Thanks
Markus
On Thu, Mar 14, 2013 at 10:39:12AM +0200, Pasi Kärkkäinen wrote:
On Thu, Mar 14, 2013 at 01:17:16PM +0800, Weibin Y. wrote:
Try the new patch, It could solve your problem.
Thanks for your test effort.
Thanks a lot!
I can confirm the “no_buffer_v5.patch” with nginx 1.2.7 fixes the problem for
me,
and both HTTP POST and HTTP PUT requests work OK now without buffering to disk.
On Tue, Feb 26, 2013 at 10:13:11PM +0800, Weibin Y. wrote:
It still worked in my box. Can you show me the debug.log
([1]Debugging | NGINX)? You need recompile  with
–with-debug configure argument and set debug level in error_log
directive.
Ok so I’ve sent you the debug log.
Can you see anything obvious in it?
I keep getting the “upstream sent invalid header while reading response
header from upstream”
error when using the no_buffer patch…
Thanks!
– Pasi
I'm using the nginx 1.2.7 el6 src.rpm rebuilt with "headers more" module
    keepalive_timeout    70;
    if_modified_since  off;
    location / {
>
> Â Â Â > Oh sorry I missed that attachment. It seems to apply and
>
>
>    > > Ã*  Ã* 2013/2/22 Pasi KÃ**â*¬rkkÃ**â*¬inen
> Â Â Â > > Ã* Â Ã* Â Ã* >
> Â Â Â doesn't work:
[objs/src/http/ngx_http_request_body.o] Error 1
> Â Â Â > > Ã* Â Ã*
> Â Â Â > > Ã* Â Ã* Â Ã* > >
> Â Â Â > > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > Ã*** Ã** Ã*** ##
> Â Â Â `proxy_request_buffering` or
> Â Â Â > > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > Ã*** Ã** Ã***
> Â Â Â **proxy_request_buffering** `on | off`
> Â Â Â > > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > Ã*** Ã** Ã*** the
with large request
> Â Â Â will be broken after
> Â Â Â > > Ã* Â Ã* Â Ã* these
> Â Â Â > > Ã* Â Ã* Â Ã* > >
> Â Â Â > > Ã* Â Ã* Â Ã* > >
> Â Â Â > > Ã* Â Ã* Â Ã* could try my
Ã*** what's the nginx
> Â Â Â > > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > Ã*** Ã** Ã*** Ã**
[4][4][6][7][10]https://github.com/taobao/tengine/pull/91.
> Â Â Â > > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > Ã*** Ã** Ã*** Ã**
Ã*** Ã** Ã*** Ã** Ã*** we want
> Â Â Â request to the local disk
> Â Â Â > > Ã* Â Ã* Â Ã* results in much high
_______________________________________________
> Â Â Â > > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** >
> Â Â Â > > Ã* Â Ã* Â Ã*
> Â Â Â Ã*
> Â Â Â [10][10][12][13][16][email protected]
Developer @ Server Platform
[13][15][16][19]https://github.com/taobao/tengine/pull/91
> Â Â Â > > Ã* Â Ã* Â Ã*
[22][24][25][28]http://mailman.nginx.org/mailman/listinfo/nginx
> Â Â Â > > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã**
> Â Â Â > > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Developer @ Server Platform
mailto:[31][32][35][email protected]
> Â Â Â > > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** 9.
mailto:[42][43][46][email protected]
> Â Â Â > > Ã* Â Ã* Â Ã* > > Ã** Ã* 20.
mailto:[53][54][57][email protected]
> Â Â Â > > Ã* Â Ã* Â Ã* >
> Â Â Â > > Ã* Â Ã* Â Ã*
> Â Â Â > > Ã* Â Ã* 2.
> Â Â Â > > Ã* Â Ã* 9.
> Â Â Â > > Ã* Â 17. [78][81]https://github.com/taobao/tengine/pull/91
> Â Â Â > > Ã* Â 25. mailto:[86][89][email protected]
> Â Â Â > > Ã* Â 34. mailto:[95][98][email protected]
[102][105]https://github.com/taobao/tengine/pull/91
> Â Â Â > > Ã* Â 49. mailto:[110][113][email protected]
[117][120]http://mailman.nginx.org/mailman/listinfo/nginx
> Â Â Â > > [123][126]http://mailman.nginx.org/mailman/listinfo/nginx
>
> Â 14. [144]http://mailman.nginx.org/mailman/listinfo/nginx
> Â 25. [155]http://mailman.nginx.org/mailman/listinfo/nginx
> Â 36. [166]http://mailman.nginx.org/mailman/listinfo/nginx
> Â 47. [177]http://mailman.nginx.org/mailman/listinfo/nginx
> Â 58. mailto:[188][email protected]
> Â 68. mailto:[198][email protected]
> Â 79. mailto:[209][email protected]
> Â 90. mailto:[220][email protected]
> Â 101. mailto:[231][email protected]
> Â 112. mailto:[242][email protected]
> Â 123. [253]http://mailman.nginx.org/mailman/listinfo/nginx
nginx mailing list
On Thu, Mar 14, 2013 at 01:17:16PM +0800, Weibin Y. wrote:
Try the new patch, It could solve your problem.
Thanks for your test effort.
Thanks a lot!
I can confirm the “no_buffer_v5.patch” with nginx 1.2.7 fixes the
problem for me,
and both HTTP POST and HTTP PUT requests work OK now without buffering
to disk.
– Pasi
> >
Did you find anything weird in the log?
with nginx-1.2.7.
> > Â Â Â I'm using the following configuration:
> >
> >
> >
> > Â Â Â # Ã* Â Ã* Â Ã* Â proxy_request_buffering Ã* Â Ã* Â Ã* Â Ã*
> >
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Use the patch I attached in
> > Â Â Â build OK.
Ã** Ã* off;
> > Â Â Â > Ã* Â Ã* Â Ã* [error] 29087#0: *60 upstream sent invalid
troubleshoot it?
10:38:21AM +0200,
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > Great, thanks, I'll
> > Â Â Â nginx 1.2.7
> > Â Â Â implicit
> > Â Â Â > Ã* Â Ã* Â Ã* > >
> > Â Â
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > >
Ã*** > Ã**** Ã*** Ã**** The
> > Â Â Â Default: 64k
> > Â Â Â `fastcgi_request_buffering` to
Ã*** has been
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** data. It could
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** you sent part of
Ã*** > Ã**** Ã*** Ã****
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > >
Ã*** Thanks,
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
> > Â Â Â [2][2][4][5][8][9]https://github.com/taobao/tengine/pull/91.
> > Â Â Â Ã**** what's the nginx
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
Ã*** > Ã**** Ã*** Ã**** Ã***
Ã*** This patch has
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã**
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** buffer the client
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** proxy to upload very
Ã*** > Ã**** Ã*** Ã**** Ã***
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
> > Â Â Â Ã**** Ã*** Ã**** Ã*** Ã**** latency
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã**
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
Ã*** > Ã**** Ã*** Ã**** Ã***
> > Â Â Â > Ã* Â Ã* Â Ã* Ã**
Ã*** > Ã**** Ã*** Ã**** Ã***
> > Â Â
> > Â Â Â Developer @ Server Platform
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
mailto:[14][16][17][20][21][email protected]
> > Â Â Â > Ã* Â Ã* Â Ã* mailto:[17][19][20][23][24][email protected]
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã**
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > >
Ã*** >
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** Ã**
Weibin Y.
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** Ã*** 2.
> > Â Â Â mailto:[34][35][38][39][email protected]
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** 11.
> > Â Â Â > Ã* Â Ã* Â Ã*
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > > Ã*** Ã** 20.
> > Â Â Â > Ã* Â Ã* Â Ã*
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** > >
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** Ã* Ã** >
 [60][61][64][65]http://mailman.nginx.org/mailman/listinfo/nginx
mailto:[62][65][66][email protected]
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* Ã** 6.
> > Â Â Â [72][75][76]http://mailman.nginx.org/mailman/listinfo/nginx
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* 17.
> > Â Â Â [83][86][87]http://mailman.nginx.org/mailman/listinfo/nginx
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* 28.
mailto:[94][97][98][email protected]
mailto:[99][102][103][email protected]
> > Â Â Â [104][107][108]https://github.com/taobao/tengine/pull/91
> > Â Â
 [113][116][117]http://mailman.nginx.org/mailman/listinfo/nginx
> > Â Â Â > Ã* Â Ã* Â Ã* > > Ã** Ã* 57.
> > Â Â Â > Ã* Â Ã* Â Ã* > >
> > Â Â Â > Ã* Â Ã* Â Ã* >
> > Â Â Â > Ã* Â Ã* Weibin Y.
> > Â Â Â > Ã* Â Ã* 4. mailto:[134][135][email protected]
> > Â Â Â > Ã* Â 12.
> > Â Â Â > Ã* Â 19. mailto:[149][150][email protected]
> > Â Â Â > Ã* Â 27.
> > Â Â Â > Ã* Â 34. mailto:[164][165][email protected]
> > Â Â Â > Ã* Â 42.
[179][180]http://mailman.nginx.org/mailman/listinfo/nginx
> > Â Â Â > Ã* Â 57.
Â
> > Â Â Â > Ã* Â 71. mailto:[201][202][email protected]
[208][209]https://github.com/taobao/tengine/pull/91
> > Â Â Â > Ã* Â 86. mailto:[216][217][email protected]
[223][224]https://github.com/taobao/tengine/pull/91
> > Â Â Â > Ã* 101. mailto:[231][232][email protected]
> > Â Â Â > Ã* 109.
> > Â Â Â > Ã* 116. mailto:[246][247][email protected]
[253][254]http://mailman.nginx.org/mailman/listinfo/nginx
> >
> >
> > Â Â 9. mailto:[271][email protected]
> > Â 20. mailto:[282][email protected]
> > Â 31. mailto:[293][email protected]
> > Â 42. mailto:[304][email protected]
> > Â 53. mailto:[315][email protected]
> > Â 64. [326]http://mailman.nginx.org/mailman/listinfo/nginx
> > Â 74. mailto:[336][email protected]
> > Â 85. mailto:[347][email protected]
> > Â 96. [358]https://github.com/taobao/tengine/pull/91
> > Â 107. [369]https://github.com/taobao/tengine/pull/91
> > Â 118. [380]http://mailman.nginx.org/mailman/listinfo/nginx
> > Â 129. mailto:[391][email protected]
> > Â 139. mailto:[401][email protected]
> > Â 150. mailto:[412][email protected]
> > Â 161. [423]https://github.com/taobao/tengine/pull/91
> > Â 172. [434]https://github.com/taobao/tengine/pull/91
> > Â 183. [445]http://mailman.nginx.org/mailman/listinfo/nginx