Giter Club home page Giter Club logo

Comments (5)

someonebw avatar someonebw commented on August 18, 2024

nginx 的worker进程,cpu占用100%的时候,通过工具,抓取的信息如下:
#./ngx-sample-lua-bt
#########
[root@localhost openresty-systemtap-toolkit]# more tmp_ok.bt
C:ngx_http_lua_ngx_re_find
optl:remath
access_all.lua:1
56414
C:ngx_http_lua_ngx_req_read_body
optl:get_posts
access_all.lua:1
1
[root@localhost openresty-systemtap-toolkit]# history |grep sample
#########
生成的火焰图如下:
qq 20170512110042

最后定位到是
optl.lua
里面的
#local function remath(_str,_re_str,_options)
导致的。

remath函数最后的
qq 20170512110408

qq 20170512110433

from openstar.

starjun avatar starjun commented on August 18, 2024

3Q , 测试复现该问题,发现目前仅在单核、CPU比较差时会出现,暂时就升级服务器配置吧,后续可能会对ngx.re.find执行时长进行限制。

from openstar.

someonebw avatar someonebw commented on August 18, 2024

行吧。
机器配置:
[root@localhost logs]# cat /proc/cpuinfo |grep 'model name'
model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz
model name : Intel(R) Core(TM) i5-2310 CPU @ 2.90GHz

from openstar.

starjun avatar starjun commented on August 18, 2024

线上服务器测试都正常,配置在搞些吧,哈
没问题的虚机:
model name : Intel(R) Xeon(R) CPU E5-26xx v3
model name : Intel(R) Xeon(R) CPU E5-26xx v3
model name : Intel(R) Xeon(R) CPU E5-26xx v3
model name : Intel(R) Xeon(R) CPU E5-26xx v3

有问题的阿里云:
model name : Intel(R) Xeon(R) CPU E5-2650 v2 @ 2.60GHz

from openstar.

someonebw avatar someonebw commented on August 18, 2024

是不是openresty的问题哦,还挑cpu?

from openstar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.