nginx worker cpu 100,怀疑代码有死循环问题。

101 views
Skip to first unread message

redcloser

unread,
Nov 11, 2016, 10:51:14 PM11/11/16
to openresty
这种情况要怎么通过工具来排查呢?

YuanSheng Wang

unread,
Nov 12, 2016, 1:47:58 AM11/12/16
to open...@googlegroups.com
可以使用火焰图查看一下 CPU 都消耗到哪里了。

具体看这里:


On Sat, Nov 12, 2016 at 11:51 AM, redcloser <jianh...@gmail.com> wrote:
这种情况要怎么通过工具来排查呢?

--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty+subscribe@googlegroups.com
发言: 请发邮件到 open...@googlegroups.com
退订: 请发邮件至 openresty+unsubscribe@googlegroups.com
归档: http://groups.google.com/group/openresty
官网: http://openresty.org/
仓库: https://github.com/agentzh/ngx_openresty
教程: http://openresty.org/download/agentzh-nginx-tutorials-zhcn.html



--

YuanSheng Wang
---------------------------------------
OpenResty lover ^_^

redcloser

unread,
Nov 14, 2016, 1:54:24 AM11/14/16
to openresty


我用ngx-sample-bt生成的数据绘制成的火焰图是这样的,没有看出什么。问题还是没有办法定位

在 2016年11月12日星期六 UTC+8下午2:47:58,YuanSheng写道:
可以使用火焰图查看一下 CPU 都消耗到哪里了。

具体看这里:

On Sat, Nov 12, 2016 at 11:51 AM, redcloser <jianh...@gmail.com> wrote:
这种情况要怎么通过工具来排查呢?

--
--
邮件来自列表“openresty”,专用于技术讨论!
订阅: 请发空白邮件到 openresty...@googlegroups.com
发言: 请发邮件到 open...@googlegroups.com
退订: 请发邮件至 openresty+...@googlegroups.com

DeJiang Zhu

unread,
Nov 14, 2016, 9:59:33 PM11/14/16
to open...@googlegroups.com
Hello


2016-11-14 14:54 GMT+08:00 redcloser <jianh...@gmail.com>:


我用ngx-sample-bt生成的数据绘制成的火焰图是这样的,没有看出什么。问题还是没有办法定位

貌似你的代码都已经被 JIT 了,你关掉 jit (jit.off) 再来一遍?

另外用 sample-bt 看一下 C 层面的火焰图,也是很有意义的 :)
 
订阅: 请发空白邮件到 openresty+subscribe@googlegroups.com
发言: 请发邮件到 open...@googlegroups.com
退订: 请发邮件至 openresty+unsubscribe@googlegroups.com

Zexuan Luo

unread,
Nov 14, 2016, 10:47:30 PM11/14/16
to openresty
这个C栈火焰图有点奇怪,只能看到nginx函数的地址,看不到函数名。标准的 OpenResty 安装包里面, Nginx 是加了 -g 选项编译的,不应该出现函数地址。

在 2016年11月14日星期一 UTC+8下午2:54:24,redcloser写道:
Reply all
Reply to author
Forward
0 new messages