我试图设置uwsgi使用pypy以下是张贴在这里,使用构buildPyPy支持作为插件的方法。 http://uwsgi-docs.readthedocs.org/en/latest/PyPy.html 我似乎设法build立使用pypy插件: Linux x86 64位: http : //projects.unbit.it/downloads/pypy/libpypy-c-x86_64_20130524.so 现在我用下面这个ini文件运行uwsgi : [uwsgi] plugins = /home/alphad/uwsgi-2.0/pypy http = :8080 chdir = /var/www/projecta/src/myproject pypy-pp = .. env = DJANGO_SETTINGS_MODULE=myproject.settings processes = 6 master=true disable-logging = false catch-exceptions = false post-buffering = 8192 vacuum = true listen = 120 pypy-home = /home/alphad/pypy-2.2.1-linux64/ pypy-lib = /home/alphad/pypy-2.2.1-linux64/lib_pypy/libpypy-c.so pypy-wsgi-file = myproject/apache/django.wsgi […]
我正在运行一个uwsgi皇帝与各种各样的封臣,每个服务从不同的virtualenv特定的Python应用程序。 由于uwsgi是用它自己的Python 2.7解释器编译的,因此试图在其中使用带有Python 3的virtualenv在vassal.log中产生以下错误: ImportError: No module named site 我相信这个错误的根源在于uwsgi正在使用其内置的Python 2.7解释器,而它所运行的virtualenv目录仅支持Python 3解释器。 事实上,当我使用另一个uwsgi(只需在同一个virtualenv中使用pip install uwsgi安装它),错误消失。 不过,我想要一个皇帝统治几个不同的virtualenvs,所以每个安装一个单独的uwsgi不是一个选项。 根据Stackoverflow上的这个答案 ,解决这个问题的正确方法是用不同的Python解释器编译uwsgi作为可加载模块。 在我采用这种方法之前,我想知道如何configuration我的Vassals以使用另一个解释器插件。 现在我有一个从我的/etc/rc.local启动的Emperor,其设置如下: [uwsgi] uid = www-data gid = www-data master = true emperor = /etc/uwsgi/vassals daemonize = /var/log/uwsgi/emperor.log 然后我有一堆像这样的ini文件的封臣: [uwsgi] master = false single-interpreter = true socket = /tmp/%n.sock virtualenv = /home/user/.virtualenvs/djangoproject chdir = /home/user/djangoproject wsgi-file = […]
我试图设置我的服务器与nginx的uwsgi到Django的堆栈,但我有uwsgi部分的问题。 当我运行uwsgi并传入命令行中的所有参数时,它可以正常工作。 我的uwsgi调用如下所示: uwsgi –socket /tmp/uwsgi.sock –chdir ~/web/test.com –wsgi-file ~/web/test.com/store/wsgi.py –virtualenv ~/web/test.com/testenv –chmod-socket=666 –enable-threads 然后我将这些参数复制到一个如下所示的ini文件中: # django.ini file [uwsgi] master = true socket = /tmp/uwsgi.sock chmod-socket = 666 chdir = /home/ubuntu/web/test.com wsgi_file = /home/ubuntu/web/test.com/store/wsgi.py virtualenv = /home/ubuntu/web/test.com/causumptionenv vacuum = true enable-threads = true 但是,当我运行与django.ini文件uwsgi,我得到这个输出。 [uWSGI] getting INI configuration from django.ini *** Starting uWSGI 1.9.11 (64bit) […]
我试图使用虚拟env与uWSGI为了使用Trac的bug跟踪器。 我已经通过pip安装了系统范围的uwsgi。 接下来,我已经在virtualenv中安装了trac $ virtualenv venv $ . venv/bin/activate $ pip install trac 然后我写了一个简单的uWSGIconfiguration脚本: [uwsgi] master = true processes = 1 socket = localhost:3032 home = /srv/http/trac/venv/ no-site = true gid = www-data uid = www-data env = TRAC_ENV=/srv/http/trac/projects/my_project module = trac.web.main:dispatch_request 但是当我尝试启动它时,它失败了: $ uwsgi –http :8000 –ini /etc/uwsgi/vassals-available/my_project.ini –gid www-data –uid www-data … Set […]
我将从我的使用案例开始,因为我很可能没有使用正确的工具来完成这项工作。 请让我知道,如果我这样做是错误的 用例:我有一个托pipe多个Web应用的CentOS服务器。 我希望能够相信我的Web服务器和应用程序服务器将运行。 我的堆栈看起来像 networking服务器:nginx 应用程序服务器:uWSGI web框架:flask / python 我想用supervisord来监视nginx和uWSGI。 在我的/etc/supervisor.conf中,我有 [program:nginxgo] command = /usr/sbin/nginx autostart=true autorestart=unexpected exitcodes=0 stdout_logfile=/home/webdev/nginxgo.log stderr_logfile=/home/webdev/nginxgoerr.log [program:uwsgi_emperor_go] command = uwsgi –emperor /etc/uwsgi/emperor.ini autostart=true autorestart=unexpected stopsignal=INT stdout_logfile=/home/webdev/emp.log stderr_logfile=/home/webdev/emperr.log directory=/home/webdev/ user=webdev 我得到了uWSGI进程。 当我input[root@mymachine]# /usr/local/bin/supervisord -n -c /etc/supervisord.conf 输出是 2014-11-26 14:07:56,917 CRIT Supervisor running as root (no user in config file) 2014-11-26 14:07:56,951 […]
我收到一个错误: ImportError: No module named site根据我的uWSGI日志ImportError: No module named site 。 test_proj.ini: [uwsgi] chdir = /home/%n/app module = %n.wsgi home = /home/%n/app/venv master = true processes = 10 chmod-socket = 664 socket = /home/%n/uwsgi/socket daemonize = /home/%n/uwsgi/log pidfile = /home/%n/uwsgi/pid nginx的: server { listen 8888; server_name 192.168.88.187; # Set up django static file serving location […]
我发现我的网站没有反应,我看到很多 *** uWSGI listen queue of socket "0.0.0.0:5002" (fd: 3) full !!! (101/100) *** *** uWSGI listen queue of socket "0.0.0.0:5002" (fd: 3) full !!! (101/100) *** *** uWSGI listen queue of socket "0.0.0.0:5002" (fd: 3) full !!! (101/100) *** 我被囚禁了吗? 到底是怎么回事?
我想知道是否有人用nginx的uwsgi来为之前的高负载django网站服务。 如果是的话,他们有什么问题吗?
我想运行uwsgi服务器作为www用户,但如果我写: uwsgi –socket $SOCKET –chmod-socket 666 –pidfile $PIDFILE –daemonize $LOGFILE –chdir $CHDIR –pp $PYTHONPATH –module main –post-buffering 8192 –workers 1 –threads 10 –uid www –gid www 发生套接字创build错误: 日志: 1 *** Starting uWSGI 1.4.1 (64bit) on [Mon Dec 10 22:15:23 2012] *** 2 compiled with version: 4.4.5 on 17 November 2012 23:31:14 3 os: Linux-2.6.32-5-amd64 #1 […]
我使用这个指南来设置它,它正在服务我的Django应用程序一段时间,但添加一个新的Django模块后,没有触及任何nginx或uwsgiconfiguration,现在服务器导致502 502错误的网关错误。 nginx error.log说: * 1上游过早closures连接,同时从上游读取响应头,客户端:xxxx,服务器:blabla.com,请求:“GET / HTTP / 1.1”,上游:“uwsgi://127.0.0.1:4000”,主机: XXXX” 我感谢你的提示,以解决这个问题。