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
已提问 10 个月前223 查看次数
2 回答
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
专家
已回答 10 个月前
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
专家
已回答 10 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则