[PATCH]Upstream: fix possible request hang when "proxy_buffering" is off.

flygoast flygoast at 126.com
Wed Jun 25 11:27:25 UTC 2014


Attach a log for this situation. Thanks.


At 2014-06-25 19:23:32,flygoast <flygoast at 126.com> wrote:

# HG changeset patch
# User FengGu <flygoast at 126.com>
# Date 1403694825 -28800
#      Wed Jun 25 19:13:45 2014 +0800
# Node ID 12fd8ef2f6ea3167dd96cb000aafeb2665aeee14
# Parent  63d7d69d0fe48e030ff9fc520c7036dbd1ebc13f
Upstream: fix possible request hang when "proxy_buffering" is off.


In ngx_http_upstream_process_non_buffered_request(), when processing non
buffered request, if write event has been delayed, deleting write timer
event is likely to result in follow-up writing buffered in
ngx_http_write_filter() ever since.


diff -r 63d7d69d0fe4 -r 12fd8ef2f6ea src/http/ngx_http_upstream.c
--- a/src/http/ngx_http_upstream.c  Fri Jun 20 12:55:41 2014 +0400
+++ b/src/http/ngx_http_upstream.c  Wed Jun 25 19:13:45 2014 +0800
@@ -3058,6 +3058,7 @@
         ngx_add_timer(downstream->write, clcf->send_timeout);


     } else if (downstream->write->timer_set) {
+        downstream->write->delayed = 0;
         ngx_del_timer(downstream->write);
     }




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20140625/a70157a1/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: nginx.log
URL: <http://mailman.nginx.org/pipermail/nginx-devel/attachments/20140625/a70157a1/attachment.ksh>


More information about the nginx-devel mailing list