0

I've been trying to get details on this but no luck. I've observed that if an ec2 instance has been running for many days (say 30-40 days), it gets degraded. Terminating that instance works.

But,

  1. Why do ec2 instances get degraded? Is it because of the hardware or the software that we are running on it?

  2. Is there anyway to avoid it?

Anmol Gupta
  • 101
  • 1
  • 1

1 Answers1

4
  1. If it's a t2.something instance class you may be running out of CPU credits. See On clarifying t2 and t3 working conditions? for more details on that.

    You can monitor your CPU credit balance in the Monitoring tab in the instance details.

  2. Other than that it's probably your software - perhaps it's got a memory leak that causes it to slowly run out of memory and spilling over to swap which makes it slow.

    You'll need to do some investigation on what's going on in the time of "degradation" - does it have high I/O, memory pressure, high swap use, etc.

EC2 alone doesn't degrade, I bet it's your app that's causing the issue and rebooting it clears it.

Hope that helps :)

MLu
  • 26,247