EC2 Instance Freezes
Solution 1
Couple of options:
Use a larger size, e.g.
t2.small
ort2.medium
- if the freezing goes away it may be memory-related.Examine CPU Credits usage - if it "freezes" when the CPU credits go low you're overloading the instance. Use a larger one.
Examine the OS logs - in
/var/log/*
. There may be some clues about memory or other problems.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
- Select the instance
- Choose "Actions > Monitor and Troubleshoot > Get Instance Screenshot"
Hope this helps.
Related videos on Youtube
Ashok Patel
Updated on September 18, 2022Comments
-
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 over 5 yearsChances are you're running out of CPU credits, as
t2.micro
is a "burstable" instance type. docs.aws.amazon.com/AWSEC2/latest/UserGuide/… -
Tim over 5 yearsCould be EBS credits as well aws.amazon.com/blogs/database/…
-
Appleoddity over 5 yearsHow 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 over 5 yearsHi 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 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 over 3 yearsView profile, Network profile for contact info and free downloadable Utility Scripts to assist with performance tuning - reduction of pauses.
-
-
Ashok Patel over 5 yearsthank you @mlu serverfault.com/users/122588/mlu
-
Chau Giang almost 3 yearsGet System Log now is under Monitor and Troubleshoot menu