From 5205687509d37aaa8054c1c6175ecbc6de692a79 Mon Sep 17 00:00:00 2001 From: Tanner Prestegard <tanner.prestegard@ligo.org> Date: Thu, 28 Mar 2019 21:38:57 -0500 Subject: [PATCH] Upgrade gunicorn version and change worker type Upgrade gunicorn to 19.9.0 and switch to an asynchronous worker class --- config/gunicorn_config.py | 4 ++-- requirements.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/gunicorn_config.py b/config/gunicorn_config.py index 9c5ef31b1..a07badb3c 100644 --- a/config/gunicorn_config.py +++ b/config/gunicorn_config.py @@ -17,8 +17,8 @@ bind = "127.0.0.1:{port}".format(port=GUNICORN_PORT) # Number of workers = 2*CPU + 1 (recommendation from Gunicorn documentation) workers = multiprocessing.cpu_count()*2 + 1 -# Worker type -worker_type = 'sync' +# Worker class +worker_class = 'gevent' # Max requests settings - a worker restarts after handling this many # requests. May be useful if we have memory leak problems. diff --git a/requirements.txt b/requirements.txt index 25217b56e..d5f2aa8c4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,7 +10,7 @@ django-user-sessions==1.6.0 djangorestframework==3.9.0 dnspython==1.15.0 flake8==3.5.0 -gunicorn==19.7.1 +gunicorn[gevent]==19.9.0 html5lib==1.0.1 ipdb==0.10.2 ipython==5.5.0 -- GitLab