From eb2511c6c92a1cb8552be2a07434096b55427bc2 Mon Sep 17 00:00:00 2001 From: Dan Callaghan Date: Jan 25 2018 10:11:35 +0000 Subject: run gunicorn with 8 workers The number is basically arbitrary. But it's higher than 1, so that a long-running request doesn't hold up the entire app. Fixes #116 (or makes it less likely to occur anyway). --- diff --git a/Dockerfile b/Dockerfile index 8695464..c5a1750 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,4 +23,4 @@ RUN if [ "$cacert_url" != "undefined" ]; then \ fi USER 1001 EXPOSE 8080 -ENTRYPOINT gunicorn --bind 0.0.0.0:8080 --access-logfile=- greenwave.wsgi:app +ENTRYPOINT gunicorn --workers 8 --bind 0.0.0.0:8080 --access-logfile=- greenwave.wsgi:app diff --git a/systemd/greenwave.service b/systemd/greenwave.service index cfa37e8..e7859bd 100644 --- a/systemd/greenwave.service +++ b/systemd/greenwave.service @@ -5,7 +5,9 @@ After=network.target [Service] EnvironmentFile=-/etc/sysconfig/greenwave -ExecStart=/usr/bin/gunicorn --bind unix:/run/greenwave/socket \ +ExecStart=/usr/bin/gunicorn \ + --workers 8 \ + --bind unix:/run/greenwave/socket \ greenwave.wsgi:app [Install]