6

I am experiencing sudden freezes in one particular instance.
Here some details of the instance:
Type: t2.micro
Region/av. zone: us-west-2b
OS: amzn-ami-hvm-2018.03.0.20180811-x86_64-gp2 (ami-a0cfeed8)

My this Ec2 instance freezes automatically.
I have docker installed in the instance.
I am new in this field.
don't have an idea from where can I get system or server log that why my ec2 instance continuously freezing, so that I can trace the problem.
Thanks in Advance.

Ashok Patel
  • 63
  • 1
  • 1
  • 3
  • 1
    Chances are you're running out of CPU credits, as `t2.micro` is a "burstable" instance type. https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-credits-baseline-concepts.html – ceejayoz Sep 25 '18 at 13:54
  • 1
    Could be EBS credits as well https://aws.amazon.com/blogs/database/understanding-burst-vs-baseline-performance-with-amazon-rds-and-gp2/ – Tim Sep 25 '18 at 19:06
  • 1
    How do you know it’s freezing? Being it’s a virtual server, it takes a little more effort to determine if a server is “frozen.” Just wondering how you know? – Appleoddity Sep 26 '18 at 04:22
  • Hi Ashok, if the response below answered your question please upvote and accept it. That's the ServerFault's way to say thank you for the time and effort someone took to help you. Thanks! – MLu Nov 03 '18 at 03:58
  • @Appleoddity I am accessing that using putty and putty console freezed.even when i tried to reconnect again, i am not able to connect so i thought that aws instance was freezed. – Ashok Patel Nov 21 '18 at 11:33
  • View profile, Network profile for contact info and free downloadable Utility Scripts to assist with performance tuning - reduction of pauses. – Wilson Hauck Jan 23 '21 at 21:32

2 Answers2

5

Couple of options:

  1. Use a larger size, e.g. t2.small or t2.medium - if the freezing goes away it may be memory-related.

  2. Examine CPU Credits usage - if it "freezes" when the CPU credits go low you're overloading the instance. Use a larger one.

  3. Examine the OS logs - in /var/log/*. There may be some clues about memory or other problems.

  4. Once it "freezes" go to EC2 -> Instances -> Actions -> Instance Settings -> Get System Log and see if you get any clues there.

Hope that helps :)

MLu
  • 23,798
  • 5
  • 54
  • 81
1

Mine runs out of memory causing the CPU to spike to 100% killing processes along the way (e.g. Apache / MySQL)

Login to console.aws.amazon.com, to view your EC2 logs

  1. Select the instance
  2. Choose "Actions > Monitor and Troubleshoot > Get Instance Screenshot"

Hope this helps.

Christian
  • 11
  • 1