apply the max_subrequests patch to allow the NGX_HTTP_MAX_SUBREQUESTS macro to be overridden from the outside and adjusted the default value from 50 to 100 because 50 is a little too conservative.

This commit is contained in:
agentzh (章亦春) 2012-02-20 16:04:30 +08:00
parent cc460be049
commit 3ba6ac3224
3 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,14 @@
--- nginx-1.0.11/src/http/ngx_http_request.h 2011-08-29 18:39:23.000000000 +0800
+++ nginx-1.0.11-patched/src/http/ngx_http_request.h 2012-02-20 15:50:43.540762756 +0800
@@ -9,7 +9,10 @@
#define NGX_HTTP_MAX_URI_CHANGES 10
-#define NGX_HTTP_MAX_SUBREQUESTS 50
+
+#ifndef NGX_HTTP_MAX_SUBREQUESTS
+#define NGX_HTTP_MAX_SUBREQUESTS 100
+#endif
/* must be 2^n */
#define NGX_HTTP_LC_HEADER_LEN 32

View File

@ -0,0 +1,14 @@
--- nginx-1.0.12/src/http/ngx_http_request.h 2011-08-29 18:39:23.000000000 +0800
+++ nginx-1.0.12-patched/src/http/ngx_http_request.h 2012-02-20 15:50:43.540762756 +0800
@@ -9,7 +9,10 @@
#define NGX_HTTP_MAX_URI_CHANGES 10
-#define NGX_HTTP_MAX_SUBREQUESTS 50
+
+#ifndef NGX_HTTP_MAX_SUBREQUESTS
+#define NGX_HTTP_MAX_SUBREQUESTS 100
+#endif
/* must be 2^n */
#define NGX_HTTP_LC_HEADER_LEN 32

View File

@ -42,6 +42,9 @@ patch -p1 < $root/patches/nginx-$main_ver-epoll_check_stale_wev.patch || exit 1
#patch -p1 < $root/patches/nginx-$main_ver-request_body_in_single_buf.patch || exit 1
echo "INFO: applying the max_subrequests patch...";
patch -p1 < $root/patches/nginx-$main_ver-max_subrequests.patch || exit 1
patch -p1 -l < $root/patches/nginx-$main_ver-subrequest_loop.patch || exit 1
patch -p1 -l < $root/patches/nginx-$main_ver-gzip_empty_flush_buf.patch || exit 1