Analyzer openresty-cosocket-pool
Name
openresty-cosocket-pool - OpenResty Cosocket Pool Statistics
This analyzer collects comprehensive statistics about cosocket connection pools in OpenResty-based applications including Kong and APISIX. It captures metrics such as:
- Pool size (maximum connections allowed)
- Total connections (currently established)
- Free connections (available for reuse)
- Backlog capacity (whether backlog queueing is enabled)
- Backlog queue length (requests waiting for connections) The analyzer generates bar charts visualizing pool utilization and backlog status, helping identify connection pool saturation, optimize pool configurations, and troubleshoot connection availability 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 openresty-cosocket-pool -p PID
# trace a shell command directly
orxray analyzer run openresty-cosocket-pool -c SHELL_CMD
# PGID is the process group ID or any process's PID within the target process
# group.
orxray analyzer run openresty-cosocket-pool -p -PGID
# trace any processes started from the specified executable path.
orxray analyzer run openresty-cosocket-pool --exe /path/to/exe/file
Tracing Multiple Processes
Supported.
Output Formats
- Bar Charts
- Plain Texts
Output Example
{
"http": {
"172.17.65.182:11212": [
{
"backlog_queue": 0,
"enabled_backlog": 0,
"pid": 3786686,
"connections": 1,
"free_connections": 1,
"size": 100
}
]
}
}
Author
The OpenResty Inc. Team.
Copyright
Copyright (C) by OpenResty Inc. All rights reserved.