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

2014-06-26 Thread Maxim Dounin
Hello! On Thu, Jun 26, 2014 at 11:10:53AM +0800, flygoast wrote: > You're right. It still can hang. I have another question: > > > What's the meaning for "c->sent - sent >= limit - (off_t) (2 * > ngx_pagesize))"? > > > I don't understand it. Why "2 * ngx_pagesize"? Can you help to explain th

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

2014-06-25 Thread flygoast
You're right. It still can hang. I have another question: What's the meaning for "c->sent - sent >= limit - (off_t) (2 * ngx_pagesize))"? I don't understand it. Why "2 * ngx_pagesize"? Can you help to explain the logic? Thanks. At 2014-06-26 02:12:33,"Maxim Dounin" wrote: >Hello! > >

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

2014-06-25 Thread Maxim Dounin
Hello! On Wed, Jun 25, 2014 at 10:00:35PM +0800, flygoast wrote: > At here: > in ngx_http_write_filter(): > > > if (limit > && c->write->ready > && c->sent - sent >= limit - (off_t) (2 * ngx_pagesize)) > { > c->write->delayed = 1; > ngx_add_timer(c->write

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

2014-06-25 Thread flygoast
At here: in ngx_http_write_filter(): if (limit && c->write->ready && c->sent - sent >= limit - (off_t) (2 * ngx_pagesize)) { c->write->delayed = 1; ngx_add_timer(c->write, 1); } limit's value from clcf->sendfile_max_chunk. In my nginx.conf, I set "se

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

2014-06-25 Thread Maxim Dounin
Hello! On Wed, Jun 25, 2014 at 07:23:32PM +0800, flygoast wrote: > # HG changeset patch > # User FengGu > # Date 1403694825 -28800 > # Wed Jun 25 19:13:45 2014 +0800 > # Node ID 12fd8ef2f6ea3167dd96cb000aafeb2665aeee14 > # Parent 63d7d69d0fe48e030ff9fc520c7036dbd1ebc13f > Upstream: fix pos

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

2014-06-25 Thread flygoast
Attach a log for this situation. Thanks. At 2014-06-25 19:23:32,flygoast wrote: # HG changeset patch # User FengGu # Date 1403694825 -28800 # Wed Jun 25 19:13:45 2014 +0800 # Node ID 12fd8ef2f6ea3167dd96cb000aafeb2665aeee14 # Parent 63d7d69d0fe48e030ff9fc520c7036dbd1ebc13f Upstream: fix

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

2014-06-25 Thread flygoast
# HG changeset patch # User FengGu # 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_