如果我使用uWSGI而没有线程模式,它工作正常。但是我的原始服务器使用Apache ServerLimit 1(线程模式)运行。 它可以处理并发连接,但我的uWSGI不能(因为工人只有1,我认为)。 所以我尝试打开线程模式,但我会从nginx获得502错误网关错误消息。uWSGI:我遇到线程模式问题
我的日志告诉我: uwsgi:Modules/gcmodule.c:277:visit_decref:声明`gc-> gc.gc_refs!= 0'失败。
我不知道有什么问题,我怎样才能使它工作? 谢谢。
这里是我的配置:
[uwsgi]
show-config=True
socket=:8002
pidfile=/var/run/unicorn_uwsgi.pid
daemonize=/root/logs/unicorn_uwsgi.log
vacuum=True
enable-threads=True
threads=40
processes=1
env=QTDIR=/root/lib/qt
env=LD_LIBRARY_PATH=/root/lib/qt/lib
env=DISPLAY=:99
env=XAUTHORITY=/root/webapps/xvfb/Xauthority.xvfb
module=WSGI
home=/root/webapps/unicorn
pythonpath=/root/Source/Server/Unicorn
chdir=/root/Source/Server/Unicorn
我使用nginx的如HTTP服务器,这里是配置:
server {
listen 80;
server_name _;
location/{
include uwsgi_params;
uwsgi_pass 127.0.0.1:8002;
}
}
OS:CentOS的6.0,CPU:AMD速龙(TM)XP 2500 +,内存:2G
的Python 2.6.5(默认),uWSGI:0.9.8.2,nginx的:0.8.54
你编译了一个自定义python,还是使用了centos6默认的?哪个uWSGI和Python版本? – 2011-07-25 05:41:34