From 09290c2f40b444eea86508493f44a8eb87e21a8e Mon Sep 17 00:00:00 2001 From: Edward Ribeiro Date: Thu, 17 Mar 2016 10:39:32 -0300 Subject: [PATCH] =?UTF-8?q?Adi=C3=A7=C3=A3o=20de=20gunicorn=20simples=20(s?= =?UTF-8?q?em=20nginx)=20e=20ajustes=20de=20workers=20do=20gunicorn?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gunicorn_start.sh | 5 +++-- simple_gunicorn.sh | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100755 simple_gunicorn.sh diff --git a/gunicorn_start.sh b/gunicorn_start.sh index d97734c68..cf1426641 100755 --- a/gunicorn_start.sh +++ b/gunicorn_start.sh @@ -2,12 +2,13 @@ # As seen in http://tutos.readthedocs.org/en/latest/source/ndg.html -NAME="sapl" # Name of the application (*) +NAME="SAPL" # Name of the application (*) DJANGODIR=`pwd` # Django project directory (*) SOCKFILE=`pwd`/run/gunicorn.sock # we will communicate using this unix socket (*) USER=`whoami` # the user to run as (*) GROUP=`whoami` # the group to run as (*) -NUM_WORKERS=1 # how many worker processes should Gunicorn spawn (*) +NUM_WORKERS=9 # how many worker processes should Gunicorn spawn (*) + # NUM_WORKERS = 2 * CPUS + 1 DJANGO_SETTINGS_MODULE=sapl.settings # which settings file should Django use (*) DJANGO_WSGI_MODULE=sapl.wsgi # WSGI module name (*) diff --git a/simple_gunicorn.sh b/simple_gunicorn.sh new file mode 100755 index 000000000..3d1bb40d4 --- /dev/null +++ b/simple_gunicorn.sh @@ -0,0 +1 @@ +gunicorn --bind 10.1.2.119:8000 sapl.wsgi:application