0

I have an ec2 instance. and I use this instance for serving Nodejs applications with GitHub action. everything is working as expected. but sometimes like after 1/2 days, the instance is not reachable by anything. it's showing an offline flag on the GitHub action tab. But, in the AWS ec2 console. it's showing running. All stats look normal. I actually have no idea why this behaves like this.

every time this happened, I have to stop and start the instance manually to up and run my server.

EC2 monitor stats

I actually think, there may be resource limitations, therefore the instance is hanging. but after I upgrade my instance type to t2.xlarge it still happens.

  • Are you sure your application isn't OOMing and crashing the instance? There seems to be an upward trend in memory usage from the image you provided. – Tyler Liu Dec 28 '22 at 05:43
  • max CPU utilization was 24% when the instance was not working. – Shanta Miah Dec 28 '22 at 06:29
  • Are you seeing these CPU spikes frequently or just before the instance becomes unresponsive? Does the CPU usage fluctuate a lot or does it usually stay at a constant level? Getting some insights into memory usage might also help, as high memory utilization could cause CPU to spike in turn (memory metrics are not available on EC2 by default - you need to install the CW agent or use a third party tool). – chamal Dec 28 '22 at 06:47
  • My average CPU utilization was 15%. – Shanta Miah Dec 28 '22 at 09:03
  • | total | used | free | shared | buff/cache | available Mem: | 15Gi | 6.2Gi | 1.6Gi | 3.0Mi | 7.8Gi | 9.1Gi – Shanta Miah Dec 28 '22 at 09:13

0 Answers0