avoid too many workers

This commit is contained in:
李扬 2017-06-19 20:06:18 +08:00 committed by GitHub
parent cbcc9cb313
commit 9b139247fa

View File

@ -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
gunicorn --workers $n --threads $n --error-logfile /log/gunicorn.log --time 600 --bind 0.0.0.0:8080 server:wsgiapp