Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example to use for ngx-lua-bt? #16

Open
xeoncross opened this issue Jun 25, 2014 · 1 comment
Open

Example to use for ngx-lua-bt? #16

xeoncross opened this issue Jun 25, 2014 · 1 comment

Comments

@xeoncross
Copy link

This tool is very useful in locating the infinite Lua loop that keeps the Nginx worker spinning with 100% CPU usage. -ngx-lua-bt

That is exactly the problem I want to debug. Could you add more detail on what to look for when using this script? Is it just a backtrace?

@agentzh
Copy link
Member

agentzh commented Jun 25, 2014

@xeoncross Yes, it dumps a Lua-land backtrace.

You may also find the gdb command "lbt" more useful for this because it also dumps the local Lua variable values in each Lua function frame: https://github.com/openresty/nginx-gdb-utils#lbt

Also, the Lua-land flame graphs are also good for this: https://github.com/openresty/stapxx#lj-lua-stacks and can give you the big picture (like, you may be unlucky to run in a Lua backtrace that is actually not the dominating thing).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants