Open Vikash082 opened 6 years ago
@Vikash082 This happened to me and it was because conflicting read timeouts - you can check a longer description of it here and see it that helps?
@Coccodrillo I changed the write timeout to 31, as suggested in the link you posted. But, it says profile is empty
(pprof) tree
profile is empty
(pprof)
Slightly off topic: I believe you can avoid hardcoding all those handlers by using this: router.Handler(http.MethodGet, "/debug/pprof/:item", http.DefaultServeMux)
(where :item
serves as a dummy placeholder variable which pprof will ignore).
Update (2020): The above suggestion doesn't seem to work any more with the latest version of this package. I was, however, able to get it to work again like so: router.Handler(http.MethodGet, "/debug/pprof/*item", http.DefaultServeMux)
.
I am using httprouter for my server. I have registered the go profilers like below:
For /pprof/profile, I get below output:
However, for heap profiling I get output like this
For symbol,
Is there something need to be done to correctly profile my server ?