How to collect a trace and heap from nginx ingress

Table of Contents


When troubleshooting an ingress-nginx issue, collecting the trace and heap dump from ingress-nginx Pods may be requested. This can assist with understanding issues like excessive memory consumption.


Access to the node(s) where the ingress-nginx Pods are experiencing the issue, or access to the node on 10254/TCP from a workstation.

To collect the output, the below commands use curl, you may need to install the package. If needed, wget could be used instead.

The date command is used to provide a consistent timestamp for the files, this could be changed or removed if the date command on the node doesn't support these flags.

The issue should be occurring at the time for the collection to be useful when investigating.


SSH to the node(s), use the following commands to collect the trace and heap dump. If the issue is intermittent or fluctuating, repeat the commands as necessary to capture the collection when the issue is ocurring.


curl -s http://localhost:10254/debug/pprof/trace?seconds=5 --output /tmp/nginx-trace.$(date -u --iso-8601=seconds)


curl -s http://localhost:10254/debug/pprof/heap --output /tmp/nginx-heap.$(date -u --iso-8601=seconds)

Note: if accessing the node on 10254/TCP instead, be sure to update localhost with the IP Address of the node.

If the files are too large to upload to the ticket, please request or use the provided temporary upload location.

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.