# HG changeset patch # User Piotr Sikora <[email protected]> # Date 1504129797 25200 # Wed Aug 30 14:49:57 2017 -0700 # Node ID 49b677bf2ae7ab92499766e8184ddcbf7a4233f9 # Parent c7d4017c8876af6d8570e400320537d7d39e9578 HTTP/2: don't limit number of requests per HTTP/2 connection.
Previous default limit (1000 requests) and lack of graceful shutdown could result in loss of requests, when clients were unable to retry. Signed-off-by: Piotr Sikora <[email protected]> diff -r c7d4017c8876 -r 49b677bf2ae7 src/http/v2/ngx_http_v2_module.c --- a/src/http/v2/ngx_http_v2_module.c +++ b/src/http/v2/ngx_http_v2_module.c @@ -11,6 +11,9 @@ #include <ngx_http_v2_module.h> +#define NGX_HTTP_V2_MAX_STREAMS (1U << 30) + + static ngx_int_t ngx_http_v2_add_variables(ngx_conf_t *cf); static ngx_int_t ngx_http_v2_variable(ngx_http_request_t *r, @@ -355,7 +358,8 @@ ngx_http_v2_merge_srv_conf(ngx_conf_t *c ngx_conf_merge_uint_value(conf->concurrent_streams, prev->concurrent_streams, 128); - ngx_conf_merge_uint_value(conf->max_requests, prev->max_requests, 1000); + ngx_conf_merge_uint_value(conf->max_requests, prev->max_requests, + NGX_HTTP_V2_MAX_STREAMS); ngx_conf_merge_size_value(conf->max_field_size, prev->max_field_size, 4096); _______________________________________________ nginx-devel mailing list [email protected] http://mailman.nginx.org/mailman/listinfo/nginx-devel
