如果我使用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