From ddada643b8b9845159332e2517ef355397fc8400 Mon Sep 17 00:00:00 2001 From: Oliver Russell Date: Thu, 2 Jul 2020 05:43:01 +0100 Subject: [PATCH] Increase number of Python/flask workers (#5824) As per: http://calpaterson.com/async-python-is-not-faster.html The number of gunicorn workers is probably too low for Flask. Cal recommends overshooting then dialling back (and also that the cost of too many workers is higher than the cost of too few), so I've upped the number of workers to a (seemingly crazy) 8. --- frameworks/Python/flask/gunicorn_conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frameworks/Python/flask/gunicorn_conf.py b/frameworks/Python/flask/gunicorn_conf.py index 817008b6d65..4a84b25affa 100644 --- a/frameworks/Python/flask/gunicorn_conf.py +++ b/frameworks/Python/flask/gunicorn_conf.py @@ -5,7 +5,7 @@ _is_pypy = hasattr(sys, 'pypy_version_info') _is_travis = os.environ.get('TRAVIS') == 'true' -workers = multiprocessing.cpu_count() * 3 +workers = multiprocessing.cpu_count() * 8 if _is_travis: workers = 2