浏览代码

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 5 年之前
父节点
当前提交
ddada643b8
共有 1 个文件被更改,包括 1 次插入1 次删除
  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_travis = os.environ.get('TRAVIS') == 'true'
 
-workers = multiprocessing.cpu_count() * 3
+workers = multiprocessing.cpu_count() * 8
 if _is_travis:
     workers = 2