Browse Source
HOT-FIX: atualiza número de workers e requests
pull/1988/head
Edward
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
2 deletions
-
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 (*) |
|
|
SOCKFILE=/var/interlegis/sapl/run/gunicorn.sock # we will communicate using this unix socket (*) |
|
|
USER=`whoami` # the user to run as (*) |
|
|
USER=`whoami` # the user to run as (*) |
|
|
GROUP=`whoami` # the group 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 |
|
|
# 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_SETTINGS_MODULE=sapl.settings # which settings file should Django use (*) |
|
|
DJANGO_WSGI_MODULE=sapl.wsgi # WSGI module name (*) |
|
|
DJANGO_WSGI_MODULE=sapl.wsgi # WSGI module name (*) |
|
|
|
|
|
|
|
@ -41,7 +42,7 @@ test -d $RUNDIR || mkdir -p $RUNDIR |
|
|
exec gunicorn ${DJANGO_WSGI_MODULE}:application \ |
|
|
exec gunicorn ${DJANGO_WSGI_MODULE}:application \ |
|
|
--name $NAME \ |
|
|
--name $NAME \ |
|
|
--workers $NUM_WORKERS \ |
|
|
--workers $NUM_WORKERS \ |
|
|
--max-requests 1000 |
|
|
--max-requests $MAX_REQUESTS \ |
|
|
--user $USER \ |
|
|
--user $USER \ |
|
|
--access-logfile - \ |
|
|
--access-logfile - \ |
|
|
--error-logfile - \ |
|
|
--error-logfile - \ |
|
|