Frequently Linux instance is not running, have to reboot the instance to make it run again.

0

We using a t2.medium Linux instance to run Java and node.js server, which is often getting stopped. After a instance reboot we are able to make the server back to live.

Where can we look for the crash log regarding the same? and what could be the possible reasons for this behavior ?

Thank you.

Suvel
質問済み 2年前256ビュー
1回答
2

If you are running Java application on your server then please check memory usage of your application. This is the most common issue that app is using all the available memory and there is nothing left for Linux to run and it will stop responding.

For monitoring I suggest to install Unified CloudWatch Agent on your EC2 instance and enable metrics for memory and swap usage. (Don't forget to give additional permissions to your IAM Role /Profile attached to your instance) and if you do not have Internet Gateway then you will also need to have "monitoring" VPC endpoint attached to your VPC.

If this issue is related to memory over usage then you have 2 options - increase instance size (cost) , limit memory usage in your java / node.js configuration (no cost), add swap (file or additional disk) on your Linux instance (small cost)

回答済み 2年前
  • Thanks Maciej Malek it was very informative, I will definitely try it and will let you know.

  • We checked the RAM usage, from which we were able to find the memory was insufficient compared to the load that it took.

    For now, we have just added Swap space to the instance to handle the load, if it doesn't work well (still crashing or latency in communicating with the server ) we planned to upgrade the instance.

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

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

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

関連するコンテンツ