In memory subrequest hang if backend return 500

Abioy Sun abioy.sun at
Wed Mar 21 02:53:45 UTC 2012

Hi All,

In the file ngx_http_upstream.c I found some code like this:

1618     if (u->headers_in.status_n > NGX_HTTP_SPECIAL_RESPONSE) {
1620         if (r->subrequest_in_memory) {
1621             u->buffer.last = u->buffer.pos;
1622         }

that means, if the status backend return if greater than 300, the first
part of the body would be abandoned.  Will this cause the issue that the
main request won't be woken again and keep sleeping until timeout? Or did I
misunderstand anything?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list