Back to all scenarios
Scenario #430
Scaling & Load
Kubernetes v1.23, Azure AKS

Memory Leak in Application Led to Excessive Scaling

A memory leak in the app led to unnecessary scaling, causing resource exhaustion.

Find this helpful?
What Happened

Application memory usage grew uncontrollably, causing HPA to continuously scale the pods.

Diagnosis Steps
  • 1kubectl top pods showed continuously increasing memory usage.
  • 2HPA logs showed scaling occurred without sufficient load.
Root Cause

Application bug causing memory leak was misinterpreted as load spike.

Fix/Workaround
• Identified and fixed the memory leak in the application code.
• Tuned autoscaling to more accurately measure actual load.
Lessons Learned

Memory issues can trigger excessive scaling ; proper monitoring is critical.

How to Avoid
  • 1Implement application-level memory monitoring.
  • 2Set proper HPA metrics to differentiate load from resource issues.