<div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial">At here:<div>in ngx_http_write_filter():</div><div><br></div><div><div> if (limit</div><div> && c->write->ready</div><div> && c->sent - sent >= limit - (off_t) (2 * ngx_pagesize))</div><div> {</div><div> c->write->delayed = 1;</div><div> ngx_add_timer(c->write, 1);</div><div> }</div><div><br></div><div>limit's value from clcf->sendfile_max_chunk. In my nginx.conf, I set "sendfile_max_chunk 8k;". I attached a debug log for this situation in last mail.</div><div><br></div><div>Thanks.</div><br><br><br><br><div></div><div id="divNeteaseMailCard"></div><br><pre><br>At 2014-06-25 21:09:29,"Maxim Dounin" <mdounin@mdounin.ru> wrote:
>Hello!
>
>On Wed, Jun 25, 2014 at 07:23:32PM +0800, flygoast wrote:
>
>> # HG changeset patch
>> # User FengGu <flygoast@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.
>
>The question is "how write event got delayed?"
>In the non-buffered mode, the r->limit_rate is explcitly set to 0,
>and this shouldn't happen.
>
>--
>Maxim Dounin
>http://nginx.org/
>
>_______________________________________________
>nginx-devel mailing list
>nginx-devel@nginx.org
>http://mailman.nginx.org/mailman/listinfo/nginx-devel
</pre></div></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>