如题谁有 uwsgi 的配置文件让我参考一下,我的配置老是出现 upstream prematurely closed connection while reading response header from upstream, client 这样的错误。 以下是我自己的配置: [uwsgi] #coding:utf-8
uwsgi 启动时所使用的地址与端口
socket = 127.0.0.1:8001
master = true
指向网站目录
chdir = /obj1/wechat/
profiler = true
enable-threads = true
logdate = true
memory-report=true
limit-as = 6048
daemnize = /obj1/wechat.log
python 启动程序文件
wsgi-file = manage.py
python 程序内用以启动的 application 变量名
callable = app
处理器数
processes = 4
线程数
threads = 2
#状态检测地址 stats = 127.0.0.1:9191
uwsgi_read_timeout = 600
harakiri = 1200
gevent = 100
10 条回复 • 2016-04-01 10:05:38 +08:00
|
1
julyclyde 2016 年 3 月 30 日
gevent 和 uwsgi 是不是功能重复啊?
|
|
4
ibigbug 2016 年 3 月 31 日
我没有使用 nginx ,直接将 uwsgi listen 80 了。目前貌似没什么坑。
|
|
7
wizardoz 2016 年 3 月 31 日
静态文件还是 nginx 比较好啊,直接用 uwsgi 提供 http 我感觉不科学,首先静态文件目录就不灵活。
|
|
9
ibigbug 2016 年 3 月 31 日
@wizardoz https://lincolnloop.com/blog/uwsgi-swiss-army-knife/ 我是看了这个。而且也是一个内部应用,能少就少一层了。
|