EC2 instance becoming unresponsive

0

I have an issue where I create a server on EC2 and it will crash after a couple of days.

When it goes down, it becomes totally unresponsive. I'm unable to:

  • Access via SSH (connection just times out)
  • Access any servers running on the port
  • Perform shutdown or reboot via the AWS console
  • Connect to the instance via AWS console

My only option is to terminate and reboot the instance.

The details of the instance are:

  • AMI name: al2023-ami-minimal-2023.1.20230705.0-kernel-6.1-arm64
  • Virtualization type: HVM
  • AZ: eu-west-2c
  • Instance type: t4g.small

When it happens, I get Status check: 1/2 checks passed:

  • System status checks: System reachability check passed
  • Instance status checks: Instance reachability check failed

I am using it to run an application in a Docker container.

asked 10 months ago821 views
1 Answer
0

This sounds very much like resource exhaustion, your EC2 is running out of something like CPU or memory and becoming unresponsive.

Does the monitoring tab of the AWS Console indicate anything that looks concerning around the time that the instance goes off the air?

The behaviour you're reporting reminds me of this question recently, which was a similar set-up to yours (small-ish instance, running Docker, kept going offline after a short while and had to be rebooted) https://repost.aws/en/questions/QULkwTBPOTQn-Q6cTmltB3nA/can-t-connect-to-my-ec2-instance-with-ssh

It would certainly be worth installing CloudWatch agent to collect more detailed metrics to assist in troubleshooting should this happen again https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html

profile picture
EXPERT
Steve_M
answered 10 months ago
  • Thanks for the response. Looking at the other question and the monitoring dashboard, it does look like this is a possibility. I think the problem is I'm running a memory hungry application in Docker and have no swap file on my 2GB machine.

    I'm going to try enabling a swap file of 4GB before upgrading the instance.

    Thank you

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions