From e8c6a261279756fd0430baf5dc779f0fe106d3a1 Mon Sep 17 00:00:00 2001 From: Edward Date: Fri, 8 Jun 2018 16:59:09 -0300 Subject: [PATCH] =?UTF-8?q?HOT-FIX:=20atualiza=20n=C3=BAmero=20de=20worker?= =?UTF-8?q?s=20e=20requests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gunicorn_start.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gunicorn_start.sh b/gunicorn_start.sh index a6611eea7..827aee378 100755 --- a/gunicorn_start.sh +++ b/gunicorn_start.sh @@ -16,8 +16,9 @@ DJANGODIR=/var/interlegis/sapl/ # Django project directory (* SOCKFILE=/var/interlegis/sapl/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=9 # how many worker processes should Gunicorn spawn (*) +NUM_WORKERS=5 # how many worker processes should Gunicorn spawn (*) # NUM_WORKERS = 2 * CPUS + 1 +MAX_REQUESTS=500 # number of requests before restarting worker DJANGO_SETTINGS_MODULE=sapl.settings # which settings file should Django use (*) DJANGO_WSGI_MODULE=sapl.wsgi # WSGI module name (*) @@ -41,7 +42,7 @@ test -d $RUNDIR || mkdir -p $RUNDIR exec gunicorn ${DJANGO_WSGI_MODULE}:application \ --name $NAME \ --workers $NUM_WORKERS \ - --max-requests 1000 + --max-requests $MAX_REQUESTS \ --user $USER \ --access-logfile - \ --error-logfile - \