Memory leak when client cache is evicting
See original GitHub issueFirst reported by @Ashald and @edio.
In a demo setup where the number of destinations exceeds the bindingCache, the linkerd process leaks memory as it adds/removes clients to/from the cache.
The easiest way to reproduce is with this docker-compose setup:
Start the demo with:
docker-compose build && docker-compose up -d
Then load the linkerd admin dashboard on docker port 9990. The initial setup has 10 destinations and a client cache size of 10. You can see from the dashboard that the heap size for the process hovers at ~85mb.
Next stop the demo:
docker-compose stop && docker-compose rm -vf
And edit linkerd.yml to shrink the binding cache size from 10 to 9. Then restart the demo and reload the admin dashboard. You’ll see the heap size start to creep up over time. Left running for about 30 minutes, heap will be ~400mb.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Garbage collection and cache eviction - Apollo GraphQL Docs
Evicting an object often makes other cached objects unreachable. Because of this, you should call cache.gc after evict ing one or more objects...
Read more >Is it a memory leak with LIRS eviction strategy in JDG6 and JDG7 ...
I have a memory/heap issue with the LIRS eviction strategy; When I put a lot of data in a cache with an eviction...
Read more >Eviction of IBM Interact session objects from cache as soon as ...
When its value is valid (a positive integer), a thread will periodically remove expired elements or objects from the cache. Its value has...
Read more >What happens when Caffeine runs out of memory?
At first it might seem beneficial to defer all of the available memory to the caches and let the garbage collector evict when...
Read more >Eviction policy | Redis Documentation Center
The eviction policy determines what happens when a database reaches its memory limit. To make room for new data, older data is evicted...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have confirmed this is a real leak. This exists in the latest build as well. I’ve taken a heap dump and working on a patch to fix this.
Frankly speaking, I have hard time recalling any details, but as @ashald mentioned, we have not been observing any related symptoms for quite a while already. I guess this issue can be closed.