Welcome! Log In Create A New Profile

Advanced

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
On Tue, Oct 27, 2009 at 6:42 PM, agentzh <agentzh@gmail.com> wrote:
> 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.
>

Finally, people, finally...I got this issue perfectly sorted out this
early morning :)

I suddenly realized last night that the "last" subrequest's
"post_subrequest" handle should call ngx_http_finalize_request on its
parent handler when the parent handler's content handler returns
anything other than NGX_DONE.

After applying this simple fix [1], the "echo" module passes its whole
test suite against 0.8.21 ~ 0.8.27 as well as all those older versions
>= 0.7.46. Hooray! :D

I've just released "echo" v0.19 which includes this fix:

http://github.com/agentzh/echo-nginx-module/downloads

In retrospect, it was indeed my fault, rather than nginx's. The newer
versions (0.8.21+) just expose my mistakes in chained subrequest
handling :P

Thanks shaun for bringing this issue to me in the other thread [2].

Special thanks go to Marcus Clyne who also cares about this problem
and my "echo" module off-list.

Thanks!
-agentzh

P.S. Lessons learned: when request hangs, first think about potential
lack of ngx_http_finalize_request call (and possible incorrect
r->main->count numbers) :)

References
[1] You can see the patch here:
http://github.com/agentzh/echo-nginx-module/commit/e73092fea78fb3fecc9cdaf0ed84e167b6a169d1
[2] http://forum.nginx.org/read.php?2,23767
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: 118
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