question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Memory leak when client cache is evicting

See original GitHub issue

First 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:

client-memory-issue.zip

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:open
  • Created 6 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
chrisgoffinetcommented, May 31, 2018

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.

0reactions
koiuocommented, Oct 24, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found