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ヶ月前
  • 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
エキスパート
回答済み 10ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ