How to use ngx-lua-conn-pools correctly?

49 views
Skip to first unread message

Chris Tanner

unread,
Jul 29, 2015, 6:27:18 AM7/29/15
to openresty-en
Hi,

I'm struggling to get any info out of this command, so I'm wondering what I'm doing wrong.

Running command:
     sudo ./ngx-lua-conn-pools -p 17231 --luajit20

I see:
Tracing 17231 (/usr/local/openresty/nginx/sbin/nginx) for LuaJIT 2.0...

And then it just hangs there until I kill it. I tried waiting about 10 minutes but still didn't get anything.

Running openresty 1.7.10.2 compiled with:

./configure --with-debug --with-http_geoip_module --with-http_realip_module;

Hopefully I've just missed something simple, let me know if I should provide more information.

Cheers,
Chris

Yichun Zhang (agentzh)

unread,
Jul 29, 2015, 8:41:52 AM7/29/15
to openresty-en
Hello!

On Wed, Jul 29, 2015 at 6:27 PM, Chris Tanner wrote:
> I'm struggling to get any info out of this command, so I'm wondering what
> I'm doing wrong.
>
> Running command:
> sudo ./ngx-lua-conn-pools -p 17231 --luajit20
>
> I see:
> Tracing 17231 (/usr/local/openresty/nginx/sbin/nginx) for LuaJIT 2.0...
>

It seems that there's just no traffic in that process to trigger the
probes this tool is watching.

Are you 100% sure that that particular worker process (pid 17231) was
actually serving traffic while you were tracing? If you're tracing
offline, you'd better just configure a single nginx worker and load it
with ab or something like that before you start the ngx-lua-conn-pools
tool.

Regards,
-agenth

Chris Tanner

unread,
Jul 29, 2015, 10:43:32 AM7/29/15
to openresty-en, age...@gmail.com
Thanks agentzh,

Unsurprisingly it was me doing it wrong, I was using the pid of the master process and not the pid of the work, limiting it down to one worker and using the pid of that worker process works correctly.

Thanks for pointing me in the right direction,
Chris
Reply all
Reply to author
Forward
0 new messages