Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak with KubernetesClient #2517

Open
dpetrovych opened this issue May 31, 2024 · 2 comments
Open

Memory leak with KubernetesClient #2517

dpetrovych opened this issue May 31, 2024 · 2 comments
Labels
Milestone

Comments

@dpetrovych
Copy link

While running YARP as ingress controller we see overall raising pattern of memory consumption and frequent restarts due to hitting pod limits.

To Reproduce

Run release/2.1/samples/KubernetesIngress.Sample/Ingress sample ingress for a breif while (10-15 minutes).
Get a GC Dump.

image

Issue has a signature / related to: kubernetes-client/csharp#1123
Present in KubernetesClient.Basic v.9.0.28.
Fixed in KubernetesClient.Basic v.10.0.1

Further technical details

  • YARP Version: 2.1.0
  • Platform/base image: mcr.microsoft.com/dotnet/aspnet:8.0.3-bookworm-slim-amd64
@dpetrovych dpetrovych added the Type: Bug Something isn't working label May 31, 2024
@dpetrovych
Copy link
Author

I started using YARP v.2.2.0-preview.1 (where KubernetesClient is update to v.10) and pattern of GC dumps have changed. Problem is not fully resolved, service continues to increse RAM usage daily. Here is comparison though 26 hours: one of the most numerable objects is CancelationTokenSource.

image

Also not sure, if such report would indicate a cyclic dependecy that prevents garbage collection:
image

@MihaZupan
Copy link
Member

Thanks for raising the issue.
It'd make sense for us to move to the more recent KubernetesClient version with the fix.

@MihaZupan MihaZupan added this to the YARP 2.x milestone Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants