From 3ba6ac3224d4442b985e89d4d9ef7727de71f0bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?agentzh=20=28=E7=AB=A0=E4=BA=A6=E6=98=A5=29?= Date: Mon, 20 Feb 2012 16:04:30 +0800 Subject: [PATCH] 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. --- patches/nginx-1.0.11-max_subrequests.patch | 14 ++++++++++++++ patches/nginx-1.0.12-max_subrequests.patch | 14 ++++++++++++++ util/mirror-tarballs | 3 +++ 3 files changed, 31 insertions(+) create mode 100644 patches/nginx-1.0.11-max_subrequests.patch create mode 100644 patches/nginx-1.0.12-max_subrequests.patch diff --git a/patches/nginx-1.0.11-max_subrequests.patch b/patches/nginx-1.0.11-max_subrequests.patch new file mode 100644 index 0000000..cbfec65 --- /dev/null +++ b/patches/nginx-1.0.11-max_subrequests.patch @@ -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 diff --git a/patches/nginx-1.0.12-max_subrequests.patch b/patches/nginx-1.0.12-max_subrequests.patch new file mode 100644 index 0000000..1f6a495 --- /dev/null +++ b/patches/nginx-1.0.12-max_subrequests.patch @@ -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 diff --git a/util/mirror-tarballs b/util/mirror-tarballs index 2eb0f44..9b0aa89 100755 --- a/util/mirror-tarballs +++ b/util/mirror-tarballs @@ -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