[nginx] Decreased the NGX_HTTP_MAX_SUBREQUESTS limit.

Valentin V. Bartenev vbart at nginx.com
Tue Sep 1 10:14:28 UTC 2015


On Tuesday 01 September 2015 09:18:17 Steven Hartland wrote:
> On 01/09/2015 06:58, Yichun Zhang (agentzh) wrote:
> > Hello!
> >
> > On Tue, Sep 1, 2015 at 4:29 AM, Valentin Bartenev wrote:
> >>   #define NGX_HTTP_MAX_URI_CHANGES           10
> >> -#define NGX_HTTP_MAX_SUBREQUESTS           200
> >> +#define NGX_HTTP_MAX_SUBREQUESTS           50
> >>
> > Hmm, this change makes me sad. In our ngx_lua module, for example, we
> > allow programatic parallel subrequests via the
> > ngx.location.capture_multi() Lua API:
> >
> >      https://github.com/openresty/lua-nginx-module#ngxlocationcapture_multi
> >
> > We'd better provide larger values in such hard-coded limits rather
> > than smaller (unless we provide a way to allow 3rd-party nginx C
> > modules to override it).
> >
> Same here we have a module which uses dynamic sub-requests to split huge 
> file requests in large amounts of smaller ranged requests which this 
> change would likely break.
> 
[..]

Why do you guys use *recursive* subrequests() for that?

Please note, that this constant now limits recursion (not parallelism)
of subrequests, when one subrequest creates another subrequest and the
depth of this subsequent chain is limited.

  wbr, Valentin V. Bartenev



More information about the nginx-devel mailing list