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.

feita há um ano492 visualizações
1 Resposta
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
ESPECIALISTA
respondido há um ano
profile picture
ESPECIALISTA
avaliado há 7 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas