From 9b139247fa1837483c63a95b8adf4542bdd3fca6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=89=AC?= Date: Mon, 19 Jun 2017 20:06:18 +0800 Subject: [PATCH] avoid too many workers --- server/run.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/run.sh b/server/run.sh index 021a6f5..9d43776 100644 --- a/server/run.sh +++ b/server/run.sh @@ -2,7 +2,7 @@ chown compiler:compiler /spj echo 0 > /tmp/counter core=$(grep --count ^processor /proc/cpuinfo) -n=$(($core*4)) +n=$(($core*2)) chmod 400 /token.txt /tmp/counter chmod -R 400 /test_case -gunicorn --workers $n --threads $n --error-logfile /log/gunicorn.log --time 600 --bind 0.0.0.0:8080 server:wsgiapp \ No newline at end of file +gunicorn --workers $n --threads $n --error-logfile /log/gunicorn.log --time 600 --bind 0.0.0.0:8080 server:wsgiapp