From eb0ea3b8d6fa2f8e03f1302ce7196f4943119954 Mon Sep 17 00:00:00 2001 From: Evgeniy Antonyuk Date: Mon, 22 Jan 2024 12:41:11 +0700 Subject: [PATCH] Limit the default worker_processes to one --- run-community-server.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/run-community-server.sh b/run-community-server.sh index 3053309..213db28 100644 --- a/run-community-server.sh +++ b/run-community-server.sh @@ -34,6 +34,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" NGINX_CONF_DIR="/etc/nginx/sites-enabled" CPU_PROCESSOR_COUNT=${CPU_PROCESSOR_COUNT:-$(cat /proc/cpuinfo | grep -i processor | awk '{print $1}' | grep -i processor | wc -l)}; NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-$(ulimit -n)}; +NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1} SERVICE_SSO_AUTH_HOST_ADDR=${SERVICE_SSO_AUTH_HOST_ADDR:-${CONTROL_PANEL_PORT_80_TCP_ADDR}}; DEFAULT_APP_CORE_MACHINEKEY="$(sudo sed -n '/"core.machinekey"/s!.*value\s*=\s*"\([^"]*\)".*!\1!p' ${APP_ROOT_DIR}/web.appsettings.config)"; IS_UPDATE="false" @@ -286,7 +287,7 @@ fi cp ${NGINX_ROOT_DIR}/includes/onlyoffice-communityserver-nginx.conf.template ${NGINX_ROOT_DIR}/nginx.conf -sed 's/^worker_processes.*/'"worker_processes ${CPU_PROCESSOR_COUNT};"'/' -i ${NGINX_ROOT_DIR}/nginx.conf +sed 's/^worker_processes.*/'"worker_processes ${NGINX_WORKER_PROCESSES};"'/' -i ${NGINX_ROOT_DIR}/nginx.conf sed 's/worker_connections.*/'"worker_connections ${NGINX_WORKER_CONNECTIONS};"'/' -i ${NGINX_ROOT_DIR}/nginx.conf cp ${NGINX_ROOT_DIR}/includes/onlyoffice-communityserver-common-init.conf.template ${NGINX_CONF_DIR}/onlyoffice