How to Collect Xray thread dumps?

Ariel Kabov
2019-11-24 09:00

The profiling endpoint in Xray is accessible via "localhost" only.

In order to collect the thread dumps:

curl "http://localhost:8000/debug/pprof/goroutine?debug=2" > "server.dump.$(date +%Y%m%d%H%M%S).td"
curl "http://localhost:7000/debug/pprof/goroutine?debug=2" > "analysis.dump.$(date +%Y%m%d%H%M%S).td"
curl "http://localhost:7002/debug/pprof/goroutine?debug=2" > "indexer.dump.$(date +%Y%m%d%H%M%S).td"
curl "http://localhost:7003/debug/pprof/goroutine?debug=2" > "persist.dump.$(date +%Y%m%d%H%M%S).td"