Welcome! Log In Create A New Profile

Advanced

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Yichun Zhang (agentzh)
October 26, 2013 02:00AM
Hello!

On Fri, Oct 25, 2013 at 10:55 PM, Yichun Zhang (agentzh) wrote:
>
> This is triggered by my own (3rd-party) module, ngx_lua. This module
> provides a ngx.flush(true) API function that flushes out all pending
> output data and *wait* (nonblockingly) until all outputs are *indeed*
> flushed out (into the system socket send buffer):
>
> https://github.com/chaoslawful/lua-nginx-module#ngxflush
>

Sorry, I pressed the mail send button too fast. Below are some more details:

Under the hood, it sends out a special buf with ->flush set and then
checks the return value of the output filter chain. If it is
NGX_AGAIN, then wait for the next write event. Upon a new write event,
call ngx_http_output_filter(r, NULL) to flush out the output and check
r->connection->buffered to see if there's still any pending data.

Is this the right way to do this? If not, do you have any suggestions?

Thanks!
-agentzh

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

[PATCH] ngx_gzip might hang the request for slow downstreams

Yichun Zhang (agentzh) 867 October 25, 2013 08:18PM

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Maxim Dounin 378 October 25, 2013 09:50PM

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Yichun Zhang (agentzh) 366 October 26, 2013 01:56AM

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Yichun Zhang (agentzh) 403 October 26, 2013 02:00AM

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Maxim Dounin 294 October 26, 2013 05:42PM

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Yichun Zhang (agentzh) 322 October 26, 2013 08:18PM

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Maxim Dounin 343 October 27, 2013 07:16AM

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Maxim Dounin 368 October 27, 2013 10:08AM

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Yichun Zhang (agentzh) 309 October 27, 2013 06:04PM

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Maxim Dounin 294 October 28, 2013 05:04PM

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Yichun Zhang (agentzh) 406 October 28, 2013 06:40PM

Re: [PATCH] ngx_gzip might hang the request for slow downstreams

Maxim Dounin 420 October 30, 2013 08:08PM



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

Online Users

Guests: 105
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