Welcome! Log In Create A New Profile

Advanced

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

Maxim Dounin
June 26, 2014 08:10AM
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 the logic?

This logic was introduced by Igor in this commit:

http://hg.nginx.org/nginx/rev/e67ef50c3176

Idea is to match cases when amout of disk-related work (almost)
matches the one allowed by sendfile_max_chunk. AFAIK, the
"ngx_pagesize" is due to the fact that reading even single
unaligned byte is identical to reading the whole page from disk,
and "2" as there are normally two unaligend ends. That is, if
4098 bytes were sent, it means that up to 3 * 4096 bytes were read
from from disk.

--
Maxim Dounin
http://nginx.org/

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

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

flygoast 723 June 25, 2014 07:26AM

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

flygoast 553 June 25, 2014 07:30AM

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

Maxim Dounin 362 June 25, 2014 09:10AM

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

flygoast 409 June 25, 2014 10:02AM

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

Maxim Dounin 371 June 25, 2014 02:14PM

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

flygoast 455 June 25, 2014 11:12PM

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

Maxim Dounin 416 June 26, 2014 08:10AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 139
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready