- Newest
- Most votes
- Most comments
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
Relevant content
- asked 2 years ago
- asked 4 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 7 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