Maxim Dounin
December 27, 2023 09:00AM
Hello!

On Wed, Dec 27, 2023 at 08:38:15PM +0800, Jiuzhou Cui wrote:

> Thank you for your reply.
>
> Firstly, we meet the problem. And this patch works for me.
>
> My scenario is after send response body about 10-20MB, we just set:
> 1. limit_rate = 1KB
> 2. limit_rate_after = body_bytes_sent
> 3. proxy_buffering = "on" (I think this is the key issue)
>
> At the request begining, we didn't set proxy_buffering = "on" and limit_rate.

Sorry, not sure what you are trying to say.

You modify r->limit_rate and r->limit_rate_after from your module
after sending some parts of the response? This is not expected to
work due to the mentioned design limitation of non-buffered
proxying, and generally looks like a bug in your module, it
shouldn't do this.

Further, it is not possible to change upstream buffering after
nginx started sending the response. It's a one-time choice, and
modifications of r->upstream->buffering won't do anything (though
also incorrect, as it's not something expected to be modified by
modules).

Or I understood something incorrectly?

--
Maxim Dounin
http://mdounin.ru/
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
https://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

Don't delete timer of write event when it's delayed.

Jiuzhou Cui 323 December 26, 2023 09:58PM

Re: Don't delete timer of write event when it's delayed.

Maxim Dounin 106 December 27, 2023 06:20AM

Re:Re: Don't delete timer of write event when it's delayed.

Jiuzhou Cui 107 December 27, 2023 07:40AM

Re: Re: Don't delete timer of write event when it's delayed.

Maxim Dounin 96 December 27, 2023 09:00AM

Re:Re: Re: Don't delete timer of write event when it's delayed.

Jiuzhou Cui 136 December 27, 2023 10:04PM



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

Online Users

Guests: 222
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready