openresty / openresty

High Performance Web Platform Based on Nginx and LuaJIT

Home Page:https://openresty.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some workers with a CPU usage of 100%, and they are stuck in the loop of luajit.

davidwudv opened this issue · comments

企业微信截图_c60ab0a9-0f70-4e1e-8c2b-17fc2cc1e411

企业微信截图_e10ca605-9ada-4bb8-a45f-16441ce4f503

企业微信截图_852fa03c-3a70-44e5-b487-a7e8e8955b01

In our production environment, it is common to encounter situations where one or more workers have a CPU usage of 100%. I have tried using openresty-gdb-utils and openresty-systemtap-toolkit but cannot obtain the Lua stack trace, only the C stack trace. By examining the source code of luajit, it seems that it is stuck in a loop within the lj_gc_step function shown in the screenshot.

We are using OpenResty version 1.13.6.2 and have attempted to update luajit separately, but the issue remains unresolved.
Could you please advise on how to solve this problem?

  1. OpenResty 1.13.6.2 is so old. You'd better update OpenResty to 1.21.4.
  2. You can use OpenResty Xray to analyze this issue.
  1. OpenResty 1.13.6.2 is so old. You'd better update OpenResty to 1.21.4.
  2. You can use OpenResty Xray to analyze this issue.

Okay, thank you.