-2

I need to know some efficient way / tools in golang that will help us to detect memory leak in the micro service that is live and running on production

Irfan21
  • 17

1 Answers1

4

One thing you can do is to compare 2 heap pprofs. You can do it like this:

  • Extract a heap profile heap0.pprof
  • Add some load to the application
  • Extract another heap profile heap1.pprof
  • Compare them with go tool pprof -base heap0.pprof heap1.pprof

This way you can see exactly what is increasing over time.

Pallav Khare
  • 471
  • 1
  • 7
  • 12