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.

질문됨 10달 전923회 조회
1개 답변
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
전문가
Steve_M
답변함 10달 전
  • 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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠