求教一个uwsgi 安装异常退出的问题

CentOS,python2.6。创建一个virtualenv激活后pip install flask正常,但是为uwsgi创建一个virtualenv后,pip install uwsgi,提示一串错误,何故?求教&br&&br&...&br&plugins/python/python_plugin.c:1775: 错误:语句不起作用
&br&&br&plugins/python/python_plugin.c:1777: 错误:‘py_getLogger_args’未声明(在此函数内第一次使用)
&br&&br&plugins/python/python_plugin.c:1777: 错误:双目运算符 * 操作数(‘struct uwsgi_option *’和‘struct uwsgi_option *’)无效
&br&&br&plugins/python/python_plugin.c:1777: 错误:语句不起作用
&br&&br&plugins/python/python_plugin.c:1779: 错误:语句不起作用
&br&&br&plugins/python/python_plugin.c:1791: 错误:隐式声明函数‘PyObject_CallMethod’
&br&&br&plugins/python/python_plugin.c:1791: 错误:expected expression before ‘)’ token
&br&&br&plugins/python/python_plugin.c:1791: 错误:双目运算符 * 操作数(‘struct uwsgi_option *’和‘struct uwsgi_option *’)无效
&br&&br&plugins/python/python_plugin.c:1795: 错误:‘struct uwsgi_python’没有名为‘gil_release’的成员
&br&&br&plugins/python/python_plugin.c:1795: 错误:被调用的对象‘&erroneous-expression&’不是一个函数
&br&&br&plugins/python/python_plugin.c:1795: 错误:语句不起作用
&br&&br&plugins/python/python_plugin.c:1799: 错误:‘struct uwsgi_python’没有名为‘gil_release’的成员
&br&&br&plugins/python/python_plugin.c:1799: 错误:被调用的对象‘&erroneous-expression&’不是一个函数
&br&&br&plugins/python/python_plugin.c:1799: 错误:语句不起作用
&br&&br&----------------------------------------
&br&Command /home/Alex/myproject/envuwsgi/bin/python -c &import
__file__='/home/Alex/myproject/envuwsgi/build/uwsgi/setup.py';exec(compile(open(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))& install --record
/tmp/pip-o9rNHV-record/install-record.txt
--single-version-externally-managed --install-headers
/home/Alex/myproject/envuwsgi/include/site/python2.6 failed with error
code 1 in /home/Alex/myproject/envuwsgi/build/uwsgi
&br&Storing complete log in /home/Alex/.pip/pip.log
CentOS,python2.6。创建一个virtualenv激活后pip install flask正常,但是为uwsgi创建一个virtualenv后,pip install uwsgi,提示一串错误,何故?求教...plugins/python/python_plugin.c:1775: 错误:语句不起作用
plugins/python/python_plugin.c:1777: 错误:‘py_getLogger_args’未声明(在此函数内第一次使用)
plugins/python/python_plugin.c:1777: 错误:双目运算符 * 操作数(‘struct uwsgi_option *’和‘struct uwsgi_option *’)无效
plugins/python/python_plugin.c:1777: 错误:语句不起作用
plugins/python/python_plugin.c:1779: 错误:语句不起作用
plugins/python/python_plugin.c:1791: 错误:隐式声明函数‘PyObject_CallMethod’
plugins/python/python_plugin.c:1791: 错误:expected expression before ‘)’ token
plugins/python/python_plugin.c:1791: 错误:双目运算符 * 操作数(‘struct uwsgi_op…
C 程序编译问题调试法则天字第一号:看第一个错误。我估计是你缺少某些包的头文件,比如 python-dev 之类。
yum install python26-devel
python-devel没装补充一下此错误多因 python-devel 和setuptools没装针对这个我写过相关文档:仅仅是错误的处理方式,我自己写的部署流程暂时找不到了。有兴趣的可以参考:不过该文章代码细节有点小问题,可能会对新人造成困惑,需要仔细留心。CentOS,python2.6。创建一个virtualenv激活后pip install flask正常,但是为uwsgi创建一个virtualenv后,pip install uwsgi,提示一串错误,何故?求教&br&&br&...&br&plugins/python/python_plugin.c:1775: 错误:语句不起作用
&br&&br&plugins/python/python_plugin.c:1777: 错误:‘py_getLogger_args’未声明(在此函数内第一次使用)
&br&&br&plugins/python/python_plugin.c:1777: 错误:双目运算符 * 操作数(‘struct uwsgi_option *’和‘struct uwsgi_option *’)无效
&br&&br&plugins/python/python_plugin.c:1777: 错误:语句不起作用
&br&&br&plugins/python/python_plugin.c:1779: 错误:语句不起作用
&br&&br&plugins/python/python_plugin.c:1791: 错误:隐式声明函数‘PyObject_CallMethod’
&br&&br&plugins/python/python_plugin.c:1791: 错误:expected expression before ‘)’ token
&br&&br&plugins/python/python_plugin.c:1791: 错误:双目运算符 * 操作数(‘struct uwsgi_option *’和‘struct uwsgi_option *’)无效
&br&&br&plugins/python/python_plugin.c:1795: 错误:‘struct uwsgi_python’没有名为‘gil_release’的成员
&br&&br&plugins/python/python_plugin.c:1795: 错误:被调用的对象‘&erroneous-expression&’不是一个函数
&br&&br&plugins/python/python_plugin.c:1795: 错误:语句不起作用
&br&&br&plugins/python/python_plugin.c:1799: 错误:‘struct uwsgi_python’没有名为‘gil_release’的成员
&br&&br&plugins/python/python_plugin.c:1799: 错误:被调用的对象‘&erroneous-expression&’不是一个函数
&br&&br&plugins/python/python_plugin.c:1799: 错误:语句不起作用
&br&&br&----------------------------------------
&br&Command /home/Alex/myproject/envuwsgi/bin/python -c &import
__file__='/home/Alex/myproject/envuwsgi/build/uwsgi/setup.py';exec(compile(open(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))& install --record
/tmp/pip-o9rNHV-record/install-record.txt
--single-version-externally-managed --install-headers
/home/Alex/myproject/envuwsgi/include/site/python2.6 failed with error
code 1 in /home/Alex/myproject/envuwsgi/build/uwsgi
&br&Storing complete log in /home/Alex/.pip/pip.log
CentOS,python2.6。创建一个virtualenv激活后pip install flask正常,但是为uwsgi创建一个virtualenv后,pip install uwsgi,提示一串错误,何故?求教...plugins/python/python_plugin.c:1775: 错误:语句不起作用
plugins/python/python_plugin.c:1777: 错误:‘py_getLogger_args’未声明(在此函数内第一次使用)
plugins/python/python_plugin.c:1777: 错误:双目运算符 * 操作数(‘struct uwsgi_option *’和‘struct uwsgi_option *’)无效
plugins/python/python_plugin.c:1777: 错误:语句不起作用
plugins/python/python_plugin.c:1779: 错误:语句不起作用
plugins/python/python_plugin.c:1791: 错误:隐式声明函数‘PyObject_CallMethod’
plugins/python/python_plugin.c:1791: 错误:expected expression before ‘)’ token
plugins/python/python_plugin.c:1791: 错误:双目运算符 * 操作数(‘struct uwsgi_op…
yum install python26-devel
C 程序编译问题调试法则天字第一号:看第一个错误。我估计是你缺少某些包的头文件,比如 python-dev 之类。
python-devel没装补充一下此错误多因 python-devel 和setuptools没装针对这个我写过相关文档:仅仅是错误的处理方式,我自己写的部署流程暂时找不到了。有兴趣的可以参考:不过该文章代码细节有点小问题,可能会对新人造成困惑,需要仔细留心。
孩爸,博客观察者, 尚能饭,能Python Linux IOS新手园地& & & 硬件问题Linux系统管理Linux网络问题Linux环境编程Linux桌面系统国产LinuxBSD& & & BSD文档中心AIX& & & 新手入门& & & AIX文档中心& & & 资源下载& & & Power高级应用& & & IBM存储AS400Solaris& & & Solaris文档中心HP-UX& & & HP文档中心SCO UNIX& & & SCO文档中心互操作专区IRIXTru64 UNIXMac OS X门户网站运维集群和高可用服务器应用监控和防护虚拟化技术架构设计行业应用和管理服务器及硬件技术& & & 服务器资源下载云计算& & & 云计算文档中心& & & 云计算业界& & & 云计算资源下载存储备份& & & 存储文档中心& & & 存储业界& & & 存储资源下载& & & Symantec技术交流区安全技术网络技术& & & 网络技术文档中心C/C++& & & GUI编程& & & Functional编程内核源码& & & 内核问题移动开发& & & 移动开发技术资料ShellPerlJava& & & Java文档中心PHP& & & php文档中心Python& & & Python文档中心RubyCPU与编译器嵌入式开发驱动开发Web开发VoIP开发技术MySQL& & & MySQL文档中心SybaseOraclePostgreSQLDB2Informix数据仓库与数据挖掘NoSQL技术IT业界新闻与评论IT职业生涯& & & 猎头招聘IT图书与评论& & & CU技术图书大系& & & Linux书友会二手交易下载共享Linux文档专区IT培训与认证& & & 培训交流& & & 认证培训清茶斋投资理财运动地带快乐数码摄影& & & 摄影器材& & & 摄影比赛专区IT爱车族旅游天下站务交流版主会议室博客SNS站务交流区CU活动专区& & & Power活动专区& & & 拍卖交流区频道交流区
UID8941284空间积分0 积分21阅读权限10帖子精华可用积分21 信誉积分120 专家积分0 在线时间33 小时注册时间最后登录
白手起家, 积分 21, 距离下一级还需 179 积分
帖子主题精华可用积分21 信誉积分120 专家积分0 在线时间33 小时注册时间最后登录
论坛徽章:0
如题, nginx+uwsgi+django,出现了一个情况,访问该页面时,如果有较大的文件,无法完全加载下来完整的文件(如比较大的js文件)
实验环境是nginx-1.0.0 uwsgi-0.9.7 django-1.1.2 python-2.6.6 Centos5.5 64位系统 kernel-2.6.18-194.26.1.el5
在本机curl页面可以完整下载,但是其他机器访问这台时,会无法完整下载,没有任何报错日志,下边是uwsgi的日志输出(20.190为本机,为了更明显的看出区别,我把这个文件dd的比较大)
[pid: 26417|app: 0|req: 35/35] 192.168.2.111 () {30 vars in 429 bytes} [Mon Apr 25 02:11:03 2011] GET /download =& generated 64000 bytes in 2630 msecs (HTTP/1.1 200) 1 headers in 61 bytes (1 switches on core 0)
[pid: 26417|app: 0|req: 36/36] 192.168.20.190 () {30 vars in 430 bytes} [Mon Apr 25 02:13:56 2011] GET /download =& generated
bytes in 4295 msecs (HTTP/1.1 200) 1 headers in 61 bytes (1 switches on core 0)
[pid: 26417|app: 0|req: 37/37] 192.168.2.56 () {40 vars in 769 bytes} [Mon Apr 25 02:14:09 2011] GET /download =& generated 64000 bytes in 2137 msecs (HTTP/1.1 200) 1 headers in 61 bytes (1 switches on core 0)
nginx没有做特殊配置,只增加了下边的几行
gzip_comp_level 2;
gzip_types text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/
location / {
& && && && &uwsgi_pass& &unix:///tmp/uwsgi_2.
& && && && &include uwsgi_
& && && & }
uwsgi的配置为
&&&module&django_wsgi&/module&
&&&socket&/tmp/uwsgi_2.sock&/socket&
&&&chmod-socket&666&/chmod-socket&
&&&processes&4&/processes&
&&&master/&
&&&harakiri&20&/harakiri&
&&&log-big&1&/log-big&
&&&home&/home/k4/Envs/k4&/home&
&&&daemonize&/home/k4/uwsgi_2/uwsgi.log&/daemonize&
&&&pidfile&/home/k4/uwsgi_2/uwsgi.pid&/pidfile&
&&&pythonpath&/home/k4/django_demo&/pythonpath&
any ideas? please help
&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp&&nbsp|&&nbsp
UID8941284空间积分0 积分21阅读权限10帖子精华可用积分21 信誉积分120 专家积分0 在线时间33 小时注册时间最后登录
白手起家, 积分 21, 距离下一级还需 179 积分
帖子主题精华可用积分21 信誉积分120 专家积分0 在线时间33 小时注册时间最后登录
论坛徽章:0
忘记说了,前提是这些静态文件没有用nginx直接来代理,所以gzip on应该是无效了。
UID空间积分0 积分2阅读权限10帖子精华可用积分2 信誉积分100 专家积分0 在线时间0 小时注册时间最后登录
白手起家, 积分 2, 距离下一级还需 198 积分
帖子主题精华可用积分2 信誉积分100 专家积分0 在线时间0 小时注册时间最后登录
论坛徽章:0
好复杂啊 !!!
UID1876396空间积分0 积分10阅读权限10帖子精华可用积分10 信誉积分106 专家积分0 在线时间1 小时注册时间最后登录
白手起家, 积分 10, 距离下一级还需 190 积分
帖子主题精华可用积分10 信誉积分106 专家积分0 在线时间1 小时注册时间最后登录
论坛徽章:0
较大文件出现问题,可能执行时间的限制
UID8941284空间积分0 积分21阅读权限10帖子精华可用积分21 信誉积分120 专家积分0 在线时间33 小时注册时间最后登录
白手起家, 积分 21, 距离下一级还需 179 积分
帖子主题精华可用积分21 信誉积分120 专家积分0 在线时间33 小时注册时间最后登录
论坛徽章:0
& & 300多k的js文件也会出问题,我只是为了看得更明显特意换了个大文件。我修改过uwsgi里harakiri的值,结果也是一样
北京皓辰网域网络信息技术有限公司. 版权所有 京ICP证:060528号 北京市公安局海淀分局网监中心备案编号:
广播电视节目制作经营许可证(京) 字第1234号
中国互联网协会会员&&联系我们:
感谢所有关心和支持过ChinaUnix的朋友们
转载本站内容请注明原作者名及出处用心创造滤镜
扫码下载App
汇聚2000万达人的兴趣社区下载即送20张免费照片冲印
扫码下载App
温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
Last edited by Django中国社区 ( 23:35)
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
在LOFTER的更多文章
loftPermalink:'',
id:'fks_',
blogTitle:'五步教你实现使用Nginx+uWSGI+Django方法部署Django程序(上)',
blogAbstract:'来源:/topic/101/
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}请教一个uWSGI socket队列的问题
在用 uswgi 启动应用时,过一段时间后,后端出现错误:*** uWSGI listen queue of socket 4 full !!! (101/100) ***恩查了下 uWSGI listen 配置段, 以下是它文档的内容listenset the socket listen queue (default: 100).Every socket has an associated queue where request will be put waiting for a process to became ready to accept them. When this queue is full requests will be rejected.The maximum value is system/kernel dependent.不是很明白这个请求队列的意思。
网络程序一般建立连接的步骤是这样:服务器端: socket-- & bind-- & listen-- & accept
socket-- & connect但是值得注意的是客户端调用connect()可能在服务器端调用accept()之前,这常常是因为服务器繁忙,正在处理其他的客户端请求,来不及处理过来。这就导致了pending connection,服务器自然不可能把这些连接丢掉,于是就会把它放进一个队列中,这个队列也不是无限的,在 & sys/socket.h & 中的SOMAXCONN变量中有定义其最大值,在linux上这个值默认是128。从 kenerl 2.4.25后,可以修改 /proc/sys/net/core/somaxconn来调整这个值。

我要回帖

更多关于 nginx uwsgi flask 的文章

 

随机推荐