Optimize uwsgi launching in dev container and prod

* Set --master flag so we have a preforking master process to manage
  subprocs
* Set max-requests to 1000 so uwsgi will recycle processes after 1000
  requests
* Set --no-orphans so uwsgi will track child processes and clean them up
  in order to respawn children
* Turn stats on in the container and install uwsgitop in dev
  requirements so we can track uwsgi stats
This commit is contained in:
Matthew Jones 2016-11-04 13:36:11 -04:00
parent 06dd5bb5d2
commit fa0780b9d0
2 changed files with 2 additions and 1 deletions

View File

@ -404,7 +404,7 @@ uwsgi: collectstatic
@if [ "$(VENV_BASE)" ]; then \
. $(VENV_BASE)/tower/bin/activate; \
fi; \
uwsgi -b 32768 --socket :8050 --module=awx.wsgi:application --home=/venv/tower --chdir=/tower_devel/ --vacuum --processes=5 --harakiri=60 --py-autoreload 1
uwsgi -b 32768 --socket :8050 --module=awx.wsgi:application --home=/venv/tower --chdir=/tower_devel/ --vacuum --processes=5 --harakiri=60 --master --no-orphans --py-autoreload 1 --max-requests=1000 --stats /tmp/stats.socket
daphne:
@if [ "$(VENV_BASE)" ]; then \

View File

@ -11,3 +11,4 @@ pytest-django
pytest-pythonpath
pytest-mock
flower
uwsgitop