EC2 Instance Freezes

9,163

Solution 1

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 :)

Solution 2

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.

Share:
9,163

Related videos on Youtube

Ashok Patel
Author by

Ashok Patel

Updated on September 18, 2022

Comments

  • Ashok Patel
    Ashok Patel over 1 year

    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.

    • ceejayoz
      ceejayoz over 5 years
      Chances are you're running out of CPU credits, as t2.micro is a "burstable" instance type. docs.aws.amazon.com/AWSEC2/latest/UserGuide/…
    • Tim
      Tim over 5 years
      Could be EBS credits as well aws.amazon.com/blogs/database/…
    • Appleoddity
      Appleoddity over 5 years
      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?
    • MLu
      MLu over 5 years
      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!
    • Ashok Patel
      Ashok Patel over 5 years
      @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.
    • Wilson Hauck
      Wilson Hauck over 3 years
      View profile, Network profile for contact info and free downloadable Utility Scripts to assist with performance tuning - reduction of pauses.
  • Ashok Patel
    Ashok Patel over 5 years
  • Chau Giang
    Chau Giang almost 3 years
    Get System Log now is under Monitor and Troubleshoot menu