Comments (5)
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
#########
生成的火焰图如下:
最后定位到是
optl.lua
里面的
#local function remath(_str,_re_str,_options)
导致的。
from openstar.
3Q , 测试复现该问题,发现目前仅在单核、CPU比较差时会出现,暂时就升级服务器配置吧,后续可能会对ngx.re.find执行时长进行限制。
from openstar.
行吧。
机器配置:
[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.
线上服务器测试都正常,配置在搞些吧,哈
没问题的虚机:
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.
是不是openresty的问题哦,还挑cpu?
from openstar.
Related Issues (20)
- multipart模式下的post请求体无法过滤 HOT 1
- openstar/access_all.lua:559: bad argument #1 to 'pairs' (table expected, got nil) HOT 1
- 关于过cdn配置ip黑名单的问题 HOT 1
- 一个小问题 HOT 1
- no suitable image found for macos HOT 1
- no http.close after http.new
- 如何配置地址白名单 HOT 1
- Jenkins 上传插件被拦截 HOT 1
- nginx: [emerg] unknown log format "main" in /opt/openresty/openstar/conf/waf.conf:62 HOT 2
- 使用bash/install.sh脚本安装出现错误,脚本中存在未定义变量install_or_version HOT 1
- attempt to index local 'optl' (a userdata value) HOT 3
- 使用bash下的脚本安装openstar后访问提示500 HOT 6
- 集群部署问题 HOT 2
- 访问http://localhost: 5460报500错误,后台error.log日志如下: HOT 1
- curl 127.0.0.1:5460 报错 HOT 7
- 功能改进 HOT 2
- 对于盲命令执行,大佬如何做检测的 HOT 1
- 安装报错:shell.lua:6: module 'resty.signal' not found HOT 1
- 4层代理-转发配置-stream配置无法保存 HOT 2
- 带正则的规则都不生效 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openstar.