Welcome! Log In Create A New Profile

Advanced

CPS-chained subrequests with I/O interceptions no longer work in nginx 0.8.21 (Was Re: Custom event + timer regressions caused by the new release)

agentzh
October 27, 2009 06:48AM
On Tue, Oct 27, 2009 at 5:41 PM, agentzh <agentzh@gmail.com> wrote:
>
> Sorry, the failures should be rephrased a bit:
>
> "All the regression tests for my "echo" module's echo_sleep directive
> that is used in subrequests chained by "post_subrequest" callback
> accepted by ngx_http_subrequest."
>

Okay, more investigation shows that the real problem has nothing to do
with "sleep", custom events, nor timers. It's the chained subrequest
model with "I/O interceptions" that no longer works in nginx 0.8.21.

The problem is much easier to phrase in terms of the "echo" module's directives:

location /main {
echo_location /foo;
echo_location /sub1;
}
location /sub1 {
proxy_pass 'http://127.0.0.1:$server_port/foo';
}
location /foo {
echo $echo_request_uri;
}

This is the minimal test case that I can produce. Basically, the
"post_subrequest" handler for the /foo subrequest issued directly by
/main issues a subrequest to /sub1. Then /sub1 in turn calls the
standard proxy module's handler to do some I/O operation. Then the
whole connection never terminates properly and hangs forever.

If no I/O operation is involved, then the whole request completes
normally in 0.8.21, no matter it's "echo_sleep" or "proxy_pass" that
do the actual I/O interception.

The "echo_location" directive and its async friend are defined in the
following .c file (for total 130+ lines of code only):

http://github.com/agentzh/echo-nginx-module/blob/master/src/location.c

Could anyone give me a handle? :)

Thanks!
-agentzh
Subject Author Posted

CPS-chained subrequests with I/O interceptions no longer work in nginx 0.8.21 (Was Re: Custom event + timer regressions caused by the new release)

agentzh October 27, 2009 06:48AM

Re: CPS-chained subrequests with I/O interceptions no longer work in nginx 0.8.21 (Was Re: Custom event + timer regressions caused by the new release)

Maxim Dounin October 27, 2009 09:44AM

Re: CPS-chained subrequests with I/O interceptions no longer work in nginx 0.8.21 (Was Re: Custom event + timer regressions caused by the new release)

agentzh October 28, 2009 12:32AM

Re: CPS-chained subrequests with I/O interceptions no longer work in nginx 0.8.21 (Was Re: Custom event + timer regressions caused by the new release)

agentzh October 28, 2009 12:48AM

Re: CPS-chained subrequests with I/O interceptions no longer work in nginx 0.8.21 (Was Re: Custom event + timer regressions caused by the new release)

agentzh October 28, 2009 05:20AM

Re: CPS-chained subrequests with I/O interceptions no longer work in nginx 0.8.21 (Was Re: Custom event + timer regressions caused by the new release)

agentzh October 28, 2009 05:20AM

Re: CPS-chained subrequests with I/O interceptions no longer work in nginx 0.8.21 (Was Re: Custom event + timer regressions caused by the new release)

Maxim Dounin October 28, 2009 06:18AM

Re: CPS-chained subrequests with I/O interceptions no longer work in nginx 0.8.21 (Was Re: Custom event + timer regressions caused by the new release)

agentzh October 28, 2009 10:44PM

Re: CPS-chained subrequests with I/O interceptions no longer work in nginx 0.8.21 (Was Re: Custom event + timer regressions caused by the new release)

agentzh November 18, 2009 11:24PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 51
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready