Skip to content

Commit

Permalink
fix: fix the bug of adjusting system parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
WGrape committed Feb 12, 2023
1 parent 6a04df7 commit 17f72e3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 27 deletions.
9 changes: 3 additions & 6 deletions bin/ngxway
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,14 @@ function start(){
mkdir -p $localVolumeLogsDir && chmod -R 777 $localVolumeLogsDir

# Run container.
docker run --name ngxwayContainer -d -p $ngxwayAddr:8090 -v $localVolumeLogsDir:/dist/logs/ ngxway
docker run --ulimit nofile=1048576:1048576 \
--sysctl net.ipv4.ip_local_port_range="1024 65535" \
--name ngxwayContainer -d -p $ngxwayAddr:8090 -v $localVolumeLogsDir:/dist/logs/ ngxway
if [ $? -ne 0 ]; then
echo -e ">>>>>>>>Start failure: failed to run<<<<<<<<"
exit 1
fi

# Exec command: adjust the system parameters.
# docker run --sysctl net.ipv4.ip_local_port_range="32768 65535" \
# --ulimit nofile=1024000:1024000
# docker run -d --ulimit nofile=1024000:1024000 ngxway

# Exec command: start the go server.
docker exec -d ngxwayContainer /dist/bin/goserver
if [ $? -ne 0 ]; then
Expand Down
7 changes: 4 additions & 3 deletions conf/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@
# Enables the use of JIT for regular expressions to speed-up their processing.
pcre_jit on;

# worker_processes auto;
worker_processes 8;
worker_cpu_affinity 000 001 010 011 100 101 110 111;
# worker_processes 8;
# worker_cpu_affinity 000 001 010 011 100 101 110 111;
worker_processes auto;
worker_cpu_affinity auto;

events {
worker_connections 1024;
Expand Down
18 changes: 0 additions & 18 deletions scripts/adjust_system_param.sh

This file was deleted.

0 comments on commit 17f72e3

Please sign in to comment.