diff options
author | Peter Stadler <peter.stadler@student.uibk.ac.at> | 2020-05-12 11:00:00 +0200 |
---|---|---|
committer | Peter Stadler <peter.stadler@student.uibk.ac.at> | 2020-05-14 09:19:45 +0200 |
commit | 62609f1587b2e272dc8a2245e36ca6dc7d0c8820 (patch) | |
tree | 4e94711cce53c1edf4e299ac2bec6e11cf8a3ced /net/nginx/files | |
parent | ba2c714aa8cd1fc7bd9166d0d383cb271ee46062 (diff) |
nginx: do not reduce max processes
Use the upstream value for NGX_MAX_PROCESSES (=1024) again.
So it is safe to use `worker_processes auto;` (which sets it to
the number of CPUs). Also use this directive in the conf instead
of calculating the number in the init and passing it as argument.
Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
Diffstat (limited to 'net/nginx/files')
-rw-r--r-- | net/nginx/files/nginx.conf | 2 | ||||
-rw-r--r-- | net/nginx/files/nginx.init | 3 |
2 files changed, 3 insertions, 2 deletions
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" \ |