Why my EC2 instance frozen?

0

My t2.micro instance becomes inaccessible when I run two processes, each loads about 112 MiB of data (plus some metadata overhead). The Instance state is still "Running". But I cannot ssh to it, neither can I send requests to it anymore. I can reboot my instance and ssh to it again, but running the two processes with those data will freeze it again.

I suspect that the two processes consume all memory in my instance. But the behavior is strange---I would expect the two processes to OOM and crash, rather than the instance freezes. In addition, the last report of free -m command (which is run every second until the terminal is disconnected from the instance) shows memory remains: total used free shared buff/cache available Mem: 949 377 377 3 194 438 Swap: 0 0 0

What could cause this problem?

Chi
demandé il y a 10 mois223 vues
2 réponses
1

I'd suggest you to setup CloudWatch monitoring to observe CPU, memory metrics before launching those two processes.

Once instance freezes, check cloudwatch metric and see where the resources limits are being hit. You might need to consider an instance of higher configuration or two instances of t2.micro and let only one process run on each.

See Cloudwatch Monitoring for more details.

profile pictureAWS
EXPERT
répondu il y a 10 mois
  • Were you able to fix the problem?

1

This usually happens when the instances memory is maxed out.

I have seen this several times and the fix is to upgrade to an instance type with more RAM.

profile picture
EXPERT
répondu il y a 10 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions