TwiN / k8s-ttl-controller

Kubernetes controller that enables timed resource deletion using TTL annotation
MIT License
40 stars 5 forks source link

Memory usage buildup #78

Open MarcoipPolo opened 2 months ago

MarcoipPolo commented 2 months ago

Describe the bug

After running the deployment for some time i noticed that it uses more and more memory as the deployment lives. This should not happen.

What do you see?

image

What do you expect to see?

Memory usage stabilizes on a certain point

List the steps that must be taken to reproduce this issue

  1. Start application
  2. Monitor the application over time

Version

0.2.0 version of helmchart

Additional information

No response

TwiN commented 2 months ago

I can 100% confirm this. I noticed it happened as well & have not been able to figure out why. For now, I decided to just set a fairly low memory limit and let it get occasionally OOMKilled.

Would strongly appreciate if somebody could investigate

MarcoipPolo commented 2 months ago

Not sure, but first thing that comes to mind is the logs that gets outputted every time that TTL controller is triggered. Maybe this article can help https://www.codereliant.io/memory-leaks-with-pprof/