Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/heroku/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何为Heroku路由器优化uWSGI';代理/缓冲情况?_Python_Heroku_Uwsgi - Fatal编程技术网

Python 如何为Heroku路由器优化uWSGI';代理/缓冲情况?

Python 如何为Heroku路由器优化uWSGI';代理/缓冲情况?,python,heroku,uwsgi,Python,Heroku,Uwsgi,我在heroku的制作中使用uWSGI已经一年多了,它似乎比Gunicorn处理一切都好得多。随着我们流量的增加,我正试图更好地理解heroku路由器和uWSGI之间的接口,以优化和防止问题,但对我来说,这一切仍然相当不透明,我有几个问题 现在,我使用的是相当普通的uwsgi配置: #heroku setup: see https://github.com/unbit/uwsgi-docs/blob/master/tutorials/heroku_python.rst http-socket =

我在heroku的制作中使用uWSGI已经一年多了,它似乎比Gunicorn处理一切都好得多。随着我们流量的增加,我正试图更好地理解heroku路由器和uWSGI之间的接口,以优化和防止问题,但对我来说,这一切仍然相当不透明,我有几个问题

现在,我使用的是相当普通的uwsgi配置:

#heroku setup: see https://github.com/unbit/uwsgi-docs/blob/master/tutorials/heroku_python.rst
http-socket = :$(PORT)
master = true
die-on-term = true
harakiri = 20
harakiri-verbose
reload-mercy = 8
max-requests = 2000
# processes = 5 # set from env var WEB_CONCURRENCY ( see Procfile)
# the below is required by new relic. be sure to monitor your system
# memory since we're enabling threads
# https://newrelic.com/docs/python/python-agent-and-uwsgi
# http://uwsgi-docs.readthedocs.org/en/latest/Options.html
enable-threads = true
single-interpreter = true

# the module
module = publisher.wsgi
阅读Heroku的文档,听起来Heroku代理做了一些独特的事情,我想知道我是否需要对uWSGI做一些特殊的事情来优化这个环境。比如说

1) (即到uwsgi)在开始排队之前同时进行

2) Heroku有可能影响uwsgi,也可能不影响uwsgi


我特别想知道我是否应该打开、调整或调整许多uWSGI设置中的任何其他设置,以获得更好的性能,或防止在Heroku路由器后面运行时出现问题。

嘿,Ben,你发布这篇文章已经一年了,我想知道你对发布的问题是否有新的见解?