summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2020-05-23 19:53:54 -0700
committerGitHub <noreply@github.com>2020-05-23 19:53:54 -0700
commitf5fdcf3e7eb2671d16d5eabc63882252855ca571 (patch)
tree18744d120a65de70a8ce2bc6161a92e0f49345cc /net
parentdccfa50d1f1296f1d085d55440a4bb479a64b0f7 (diff)
parent62609f1587b2e272dc8a2245e36ca6dc7d0c8820 (diff)
Merge pull request #12159 from peter-stadler/nginx-smp
nginx: do not reduce max processes
Diffstat (limited to 'net')
-rw-r--r--net/nginx/Makefile2
-rw-r--r--net/nginx/files/nginx.conf2
-rw-r--r--net/nginx/files/nginx.init3
-rw-r--r--net/nginx/patches/300-max-processes.patch11
4 files changed, 4 insertions, 14 deletions
diff --git a/net/nginx/Makefile b/net/nginx/Makefile
index cfd6b47c0..2be5c6e9b 100644
--- a/net/nginx/Makefile
+++ b/net/nginx/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=nginx
PKG_VERSION:=1.17.10
-PKG_RELEASE:=2
+PKG_RELEASE:=3
PKG_SOURCE:=nginx-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://nginx.org/download/
diff --git a/net/nginx/files/nginx.conf b/net/nginx/files/nginx.conf
index 65d37b504..da1cbdf42 100644
--- a/net/nginx/files/nginx.conf
+++ b/net/nginx/files/nginx.conf
@@ -1,6 +1,8 @@
# Please consider creating files in /etc/nginx/conf.d/ instead of editing this.
# For details see https://openwrt.org/docs/guide-user/services/webserver/nginx
+worker_processes auto;
+
user root;
events {}
diff --git a/net/nginx/files/nginx.init b/net/nginx/files/nginx.init
index 57142950b..fa189931c 100644
--- a/net/nginx/files/nginx.init
+++ b/net/nginx/files/nginx.init
@@ -16,9 +16,8 @@ start_service() {
${NGINX_UTIL} init_lan
procd_open_instance
- NCPUS="$(grep -c '^processor\s*:' /proc/cpuinfo)"
procd_set_param command /usr/sbin/nginx -c "${NGINX_CONF}" \
- -g "daemon off; worker_processes $NCPUS;"
+ -g "daemon off;"
procd_set_param stdout 1
procd_set_param stderr 1
procd_set_param file "${LAN_LISTEN}" "${LAN_LISTEN}.default" \
diff --git a/net/nginx/patches/300-max-processes.patch b/net/nginx/patches/300-max-processes.patch
deleted file mode 100644
index f7465d434..000000000
--- a/net/nginx/patches/300-max-processes.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/src/os/unix/ngx_process.h
-+++ b/src/os/unix/ngx_process.h
-@@ -44,7 +44,7 @@ typedef struct {
- } ngx_exec_ctx_t;
-
-
--#define NGX_MAX_PROCESSES 1024
-+#define NGX_MAX_PROCESSES 8
-
- #define NGX_PROCESS_NORESPAWN -1
- #define NGX_PROCESS_JUST_SPAWN -2