Hey there,
I have a Go webapp that serves a complicated website, including a search engine, recommendation engine, all kinds of caches for TB of content, etc.
The app is using too much memory and the CPU increases recently. I'd like to profile both memory and CPU, live, so I can figure out what is going on.
I tried "
github.com/pkg/profile" but the latest version does not seem to allow both CPU & memory to be profiled at the same time, and I didn't manage to get it to work. It created the mem.pprof file but the filesize was always zero.
I then tried adding import _ "net/http/pprof" but the /debug/pprof/profile URL didn't work, the site returned its custom 404 error page.
Obviously I don't quite understand how to do the profiling... I've looked through the documentation but I still don't understand how to make it work. Could someone please explain this to me?
Thanks!
Alasdair