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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠