Skip to content

Commit

Permalink
Limiting the maximum number of simultaneous connections
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-antonyuk committed Jul 30, 2024
1 parent b9bde20 commit b013c55
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion run-community-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ DOCKER_ENABLED=${DOCKER_ENABLED:-true};
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)};
# Limiting the maximum number of simultaneous connections due to possible memory shortage
[ $(ulimit -n) -gt 1048576 ] && NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-1048576} || 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)";
Expand Down

0 comments on commit b013c55

Please sign in to comment.