Use the patch I attached in this mail thread instead, don't use the pull request patch which is for tengine. <div><br></div><div>Thanks.<br><br><div class="gmail_quote">2013/2/22 Pasi Kärkkäinen <span dir="ltr"><<a href="mailto:pasik@iki.fi" target="_blank">pasik@iki.fi</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Jan 18, 2013 at 10:38:21AM +0200, Pasi Kärkkäinen wrote:<br>
> On Thu, Jan 17, 2013 at 11:15:58AM +0800, ?????? wrote:<br>
> > Yes. It should work for any request method.<br>
> ><br>
><br>
> Great, thanks, I'll let you know how it works for me. Probably in two weeks or so.<br>
><br>
<br>
</div>Hi,<br>
<br>
Adding the tengine pull request 91 on top of nginx 1.2.7 doesn't work:<br>
<br>
cc1: warnings being treated as errors<br>
src/http/ngx_http_request_body.c: In function 'ngx_http_read_non_buffered_client_request_body':<br>
src/http/ngx_http_request_body.c:506: error: implicit declaration of function 'ngx_http_top_input_body_filter'<br>
make[1]: *** [objs/src/http/ngx_http_request_body.o] Error 1<br>
make[1]: Leaving directory `/root/src/nginx/nginx-1.2.7'<br>
make: *** [build] Error 2<br>
<br>
ngx_http_top_input_body_filter() cannot be found from any .c/.h files..<br>
Which other patches should I apply?<br>
<br>
Perhaps this?<br>
<a href="https://github.com/cfsego/limit_upload_rate/blob/master/for-nginx.patch" target="_blank">https://github.com/cfsego/limit_upload_rate/blob/master/for-nginx.patch</a><br>
<br>
<br>
Thanks,<br>
<div class="HOEnZb"><div class="h5"><br>
-- Pasi<br>
<br>
><br>
> > 2013/1/16 Pasi KÀrkkÀinen <[1]<a href="mailto:pasik@iki.fi">pasik@iki.fi</a>><br>
> ><br>
> > On Sun, Jan 13, 2013 at 08:22:17PM +0800, ?????? wrote:<br>
> > > Â Â This patch should work between nginx-1.2.6 and nginx-1.3.8.<br>
> > > Â Â The documentation is here:<br>
> ><br>
> > > Â Â ## client_body_postpone_sending ##<br>
> > > Â Â Syntax: **client_body_postpone_sending** `size`<br>
> > > Â Â Default: 64k<br>
> > > Â Â Context: `http, server, location`<br>
> > > Â Â If you specify the `proxy_request_buffering` or<br>
> > > Â Â `fastcgi_request_buffering` to be off, Nginx will send the body<br>
> > to backend<br>
> > > Â Â when it receives more than `size` data or the whole request body<br>
> > has been<br>
> > > Â Â received. It could save the connection and reduce the IO number<br>
> > with<br>
> > > Â Â backend.<br>
> > ><br>
> > > Â Â ## proxy_request_buffering ##<br>
> > > Â Â Syntax: **proxy_request_buffering** `on | off`<br>
> > > Â Â Default: `on`<br>
> > > Â Â Context: `http, server, location`<br>
> > > Â Â Specify the request body will be buffered to the disk or not. If<br>
> > it's off,<br>
> > > Â Â the request body will be stored in memory and sent to backend<br>
> > after Nginx<br>
> > > Â Â receives more than `client_body_postpone_sending` data. It could<br>
> > save the<br>
> > > Â Â disk IO with large request body.<br>
> > ><br>
> > ><br>
> > > Â Â Â Â Â Â Note that, if you specify it to be off, the nginx<br>
> > retry mechanism<br>
> > > Â Â with unsuccessful response will be broken after you sent part of<br>
> > the<br>
> > > Â Â request to backend. It will just return 500 when it encounters<br>
> > such<br>
> > > Â Â unsuccessful response. This directive also breaks these<br>
> > variables:<br>
> > > Â Â $request_body, $request_body_file. You should not use these<br>
> > variables any<br>
> > > Â Â more while their values are undefined.<br>
> > ><br>
> ><br>
> > Hello,<br>
> ><br>
> > This patch sounds exactly like what I need aswell!<br>
> > I assume it works for both POST and PUT requests?<br>
> ><br>
> > Thanks,<br>
> ><br>
> > -- Pasi<br>
> ><br>
> > > Â Â Â Hello!<br>
> > > Â Â Â @yaoweibin<br>
> > ><br>
> > > Â Â Â Â If you are eager for this feature, you could try my<br>
> > > Â Â Â Â patch: [2][2]<a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a>.<br>
> > This patch has<br>
> > > Â Â Â Â been running in our production servers.<br>
> > ><br>
> > > Â Â Â what's the nginx version your patch based on?<br>
> > > Â Â Â Thanks!<br>
> > >    On Fri, Jan 11, 2013 at 5:17 PM, Ã*Å Ã*°±ó<br>
> > <[3][3]<a href="mailto:yaoweibin@gmail.com">yaoweibin@gmail.com</a>> wrote:<br>
> > ><br>
> > > Â Â Â Â I know nginx team are working on it. You can wait for it.<br>
> > > Â Â Â Â If you are eager for this feature, you could try my<br>
> > > Â Â Â Â patch: [4][4]<a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a>.<br>
> > This patch has<br>
> > > Â Â Â Â been running in our production servers.<br>
> > ><br>
> > > Â Â Â Â 2013/1/11 li zJay <[5][5]<a href="mailto:zjay1987@gmail.com">zjay1987@gmail.com</a>><br>
> > ><br>
> > > Â Â Â Â Â Hello!<br>
> > > Â Â Â Â Â is it possible that nginx will not buffer the client<br>
> > body before<br>
> > > Â Â Â Â Â handle the request to upstream?<br>
> > > Â Â Â Â Â we want to use nginx as a reverse proxy to upload very<br>
> > very big file<br>
> > > Â Â Â Â Â to the upstream, but the default behavior of nginx is to<br>
> > save the<br>
> > > Â Â Â Â Â whole request to the local disk first before handle it<br>
> > to the<br>
> > > Â Â Â Â Â upstream, which make the upstream impossible to process<br>
> > the file on<br>
> > > Â Â Â Â Â the fly when the file is uploading, results in much high<br>
> > request<br>
> > > Â Â Â Â Â latency and server-side resource consumption.<br>
> > > Â Â Â Â Â Thanks!<br>
> > > Â Â Â Â Â _______________________________________________<br>
> > > Â Â Â Â Â nginx mailing list<br>
> > > Â Â Â Â Â [6][6]<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > > Â Â Â Â Â [7][7]<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > ><br>
> > > Â Â Â Â --<br>
> > > Â Â Â Â Weibin Yao<br>
> > > Â Â Â Â Developer @ Server Platform Team of Taobao<br>
> > > Â Â Â Â _______________________________________________<br>
> > > Â Â Â Â nginx mailing list<br>
> > > Â Â Â Â [8][8]<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > > Â Â Â Â [9][9]<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > ><br>
> > > Â Â Â _______________________________________________<br>
> > > Â Â Â nginx mailing list<br>
> > > Â Â Â [10][10]<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > > Â Â Â [11][11]<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > ><br>
> > > Â Â --<br>
> > > Â Â Weibin Yao<br>
> > > Â Â Developer @ Server Platform Team of Taobao<br>
> > ><br>
> > > References<br>
> > ><br>
> > > Â Â Visible links<br>
> > > Â Â 1. mailto:[12]<a href="mailto:zjay1987@gmail.com">zjay1987@gmail.com</a><br>
> > > Â Â 2. [13]<a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a><br>
> > > Â Â 3. mailto:[14]<a href="mailto:yaoweibin@gmail.com">yaoweibin@gmail.com</a><br>
> > > Â Â 4. [15]<a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a><br>
> > > Â Â 5. mailto:[16]<a href="mailto:zjay1987@gmail.com">zjay1987@gmail.com</a><br>
> > > Â Â 6. mailto:[17]<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > > Â Â 7. [18]<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > > Â Â 8. mailto:[19]<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > > Â Â 9. [20]<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > > Â 10. mailto:[21]<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > > Â 11. [22]<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> ><br>
> > > _______________________________________________<br>
> > > nginx mailing list<br>
> > > [23]<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > > [24]<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> ><br>
> > _______________________________________________<br>
> > nginx mailing list<br>
> > [25]<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > [26]<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> ><br>
> > --<br>
> > Weibin Yao<br>
> > Developer @ Server Platform Team of Taobao<br>
> ><br>
> > References<br>
> ><br>
> > Visible links<br>
> > 1. mailto:<a href="mailto:pasik@iki.fi">pasik@iki.fi</a><br>
> > 2. <a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a><br>
> > 3. mailto:<a href="mailto:yaoweibin@gmail.com">yaoweibin@gmail.com</a><br>
> > 4. <a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a><br>
> > 5. mailto:<a href="mailto:zjay1987@gmail.com">zjay1987@gmail.com</a><br>
> > 6. mailto:<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > 7. <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > 8. mailto:<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > 9. <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > 10. mailto:<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > 11. <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > 12. mailto:<a href="mailto:zjay1987@gmail.com">zjay1987@gmail.com</a><br>
> > 13. <a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a><br>
> > 14. mailto:<a href="mailto:yaoweibin@gmail.com">yaoweibin@gmail.com</a><br>
> > 15. <a href="https://github.com/taobao/tengine/pull/91" target="_blank">https://github.com/taobao/tengine/pull/91</a><br>
> > 16. mailto:<a href="mailto:zjay1987@gmail.com">zjay1987@gmail.com</a><br>
> > 17. mailto:<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > 18. <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > 19. mailto:<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > 20. <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > 21. mailto:<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > 22. <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > 23. mailto:<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > 24. <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
> > 25. mailto:<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > 26. <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
><br>
> > _______________________________________________<br>
> > nginx mailing list<br>
> > <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> > <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
><br>
> _______________________________________________<br>
> nginx mailing list<br>
> <a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
> <a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Weibin Yao<br>Developer @ Server Platform Team of Taobao
</div>