Quellcode durchsuchen

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.
Oliver Russell vor 5 Jahren
Ursprung
Commit
ddada643b8
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      frameworks/Python/flask/gunicorn_conf.py

+ 1 - 1
frameworks/Python/flask/gunicorn_conf.py

@@ -5,7 +5,7 @@ import sys
 _is_pypy = hasattr(sys, 'pypy_version_info')
 _is_pypy = hasattr(sys, 'pypy_version_info')
 _is_travis = os.environ.get('TRAVIS') == 'true'
 _is_travis = os.environ.get('TRAVIS') == 'true'
 
 
-workers = multiprocessing.cpu_count() * 3
+workers = multiprocessing.cpu_count() * 8
 if _is_travis:
 if _is_travis:
     workers = 2
     workers = 2