# Investigating Golang Memory Leak with Pprof

DevFeed: [Investigating Golang Memory Leak with Pprof](<https://devfeed.tech/articles/investigating-golang-memory-leak-with-pprof-80005.md>)

Original publisher: [Read original article](<https://www.groundcover.com/blog/golang-pprof>)

Author: Aviv Zohari

Published: 2023-01-04T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ground Cover](<https://devfeed.tech/sources/ground-cover.md>)

Topics: [Memory Leaks](<https://devfeed.tech/topics/memory-leaks.md>), [Go Language](<https://devfeed.tech/topics/go-language.md>)

Tags: [golang](<https://devfeed.tech/tags/golang.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [memory-leaks](<https://devfeed.tech/tags/memory-leaks.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pprof](<https://devfeed.tech/tags/pprof.md>)

## AI overview

The article shows how developers used Go's pprof profiler to trace steadily growing heap usage in a production service to cached container IDs that retained entire Prometheus responses. Copying each ID before caching fixed the memory retention. It also explains how heap profiles and call-flow views can help locate allocation paths.

## Source excerpt

Discover pprof's capabilities in tackling bugs and memory leaks, with a real-life case study examining its impact on performance.