Instance reachability check failed on both of my EC2 Instances

0

I have 2 EC2 Instances "t2.micro Ubuntu 20" and after a couple of days they always turn into "Instance reachability check failed", reboot does not fix it so I need to stop and start them again.

I just have a LAMP env set up, nothing fancy and two (Laravel) webpages running on them without any real traffic as I use the instances currently for development.

When I check the "Get system Log" in monitoring and troubelshoot, NO errors are shown. The Instance reachability error occurs randonly (after a few days, or sometimes after a few hours) when I am not even using or accessing the server.

It happens on both of my EC2 Instances which I have set up and configured separatly (not through AIM). It only seems to happen or at least more often when Apache is running.

gefragt vor einem Jahr489 Aufrufe
1 Antwort
0

Once you mentioned t2.micro and Apache this sounds familiar. The t2.micro is free tier and pretty low-spec, and your workload may run fine at the start but it will slowly consume more resources until it runs out of something. My experience with Apache on t2.micro is that this is most likely to be memory, and it would be worth setting up CloudWatch agent to collect more detailed system logs https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/Install-CloudWatch-Agent.html - this should show if your root cause is exhaustion of memory (or some other system resources).

If this is the case the fix could be to uplift your instance type (although this means it will no longer be in scope of free tier), or even just a cron job to do a daily restart of Apache.

profile picture
EXPERTE
beantwortet vor einem Jahr
profile picture
EXPERTE
überprüft vor 7 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen