HTTP/2: don't limit the number of requests per HTTP/2 connection.
Previous limit (1000 requests) and lack of graceful shutdown could
result in lost requests when clients were unable to retry.
Change-Id: I850e807698676f700cdb6d63d98b3816a8eb92bc
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
Reviewed-on: https://nginx-review.googlesource.com/3100
Reviewed-by: Lizan Zhou <zlizan@google.com>
Reviewed-by: Feng Li <fengli@google.com>
diff --git a/src/http/v2/ngx_http_v2_module.c b/src/http/v2/ngx_http_v2_module.c
index 032abcb..330cdfa 100644
--- 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_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);