Analyzer ngx-dump-cur-req

Name

ngx-dump-cur-req - Dump Nginx Request

This analyzer captures real-time snapshots of currently processing HTTP requests in Nginx-based web servers including OpenResty and Kong. It samples active requests during the specified time window, extracting request details from both C-level and LuaJIT execution contexts. The analyzer provides text-based output for immediate inspection of in-flight requests, helping troubleshoot hanging requests, slow processing, and runtime issues.

Resource Category

Network I/O.

Application Type & Technical Stack

  • OpenResty
  • Kong
  • APISIX

Command Line Syntax

The analyzer can be invoked directly on the command-line via the orxray utility from the openresty-xray-cli software package.

Alternatively, the analyzer can also be invoked manually or automatically on the web console UI of OpenResty XRay (like on the Advanced web page).

# PID is the target process PID.
orxray analyzer run ngx-dump-cur-req -p PID

# trace a shell command directly
orxray analyzer run ngx-dump-cur-req -c SHELL_CMD

# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run ngx-dump-cur-req -p -PGID

# trace any processes started from the specified executable path.
orxray analyzer run ngx-dump-cur-req --exe /path/to/exe/file

Tracing Multiple Processes

Supported.

Output Formats

  • Plain Texts

Output Example

http request, No. 1
GET /example1 HTTP/1.1
Upgrade: websocket
Host: test.com
http request, No. 2
GET /example2 HTTP/1.1
Upgrade: websocket
Host: test.com

Author

The OpenResty Inc. Team.

Copyright (C) by OpenResty Inc. All rights reserved.