Kube-state-metrics 20x spikes in memory usage at restart #2302
Labels
kind/bug
Categorizes issue or PR as related to a bug.
triage/accepted
Indicates an issue or PR is ready to be actively worked on.
What happened:
A few of our
kube-state-metrics
instance (single-instance, no sharding) recently had OOM issues after restart. The memory usage spiked up to 2.5GB (see attachment) for a few minutes before stabilized at 131 MB. We tried to increase the CPU limit from the default 0.1 to 1 or even 5, but it does not seem to help much.Here is the pprof profile I captured:
Looks like heap memory usage does not represent 100% of the
container_memory_usage_bytes
metric.What you expected to happen:
memory usage to not spike 20x at restart
How to reproduce it (as minimally and precisely as possible):
Kill/restart the KSM pod.
Anything else we need to know?:
Environment:
kubectl version
):v1.24.17-eks-8cb36c9
The text was updated successfully, but these errors were encountered: