Browse Source

Remove rebuild_index e reduz workers gunicorn

pull/2060/head
Edward Ribeiro 7 years ago
parent
commit
74dbdf3881
  1. 3
      gunicorn_start.sh
  2. 2
      start.sh

3
gunicorn_start.sh

@ -16,7 +16,7 @@ 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=3 # how many worker processes should Gunicorn spawn (*)
# NUM_WORKERS = 2 * CPUS + 1
TIMEOUT=60
MAX_REQUESTS=100 # number of requests before restarting worker
@ -42,6 +42,7 @@ test -d $RUNDIR || mkdir -p $RUNDIR
# Programs meant to be run under supervisor should not daemonize themselves (do not use --daemon)
exec gunicorn ${DJANGO_WSGI_MODULE}:application \
--name $NAME \
--log-level debug \
--timeout $TIMEOUT \
--workers $NUM_WORKERS \
--max-requests $MAX_REQUESTS \

2
start.sh

@ -49,7 +49,7 @@ create_env
# manage.py migrate --noinput nao funcionava
yes yes | python3 manage.py migrate
#python3 manage.py collectstatic --no-input
python3 manage.py rebuild_index --noinput &
# python3 manage.py rebuild_index --noinput &
echo "Criando usuário admin..."

Loading…
Cancel
Save