EC2 instance 100% CPU utilisation then stuck at 10%, Completely frozen Can't even ssh in
An ec2 t2.micro instance (linux) shows a very abnormal behavior. I have a very light application which usually consumes less than 3% of CPU usage. Suddenly (almost each 4th day) the instance jumps at 100% CPU usage for around 12 hours and then stucks to 10% .
When the instance is stuck, I can't even ssh in, the ssh connection just times out. Ine the image below the behavior is shown. After I stop & start the instance again, everything works again.
Some other details:
- the instance has a security group that only allows my ip address to connect via ssh.
- The app runs in a docker container and it barely receives traffic.
Any ideas would be highly appreciated :)
This can easily be caused by some sort of (default) scheduled activity on the instance. Unfortunately, you have not disclosed the OS type / Linux distribution.
You may consider upscaling the instance and/or enabling T2/T3 Unlimited mode in order to accommodate the workload without causing a disruption.
You may also consider enabling T2/T3 Unlimited mode just so you will be able to connect to the instance when the activity is happening, and then investigating the cause.
You can find the scheduled jobs by running commands such as
find /etc/cron.* -type f -not -name .placeholder
systemctl --type=timer
Relevant questions
SSH into EC2 stops accepting connections after about 8 minutes
asked 6 months agoEc2 instance goes down every day
asked 3 months agoEC2 instance - Server refused our key
asked 5 months agoConnect Windows 10 WorkSpace to Amazon Linux 2 EC2 Instance
asked 3 months agoEC2 Instance No Response after Force Stop
asked 4 months agoEC2 instance 100% CPU utilisation then stuck at 10%, Completely frozen Can't even ssh in
asked 4 months agoInstance running very slowly - not sure on best instance type
asked 16 days agoEC2 Instance Stuck in "stopping" state
asked 3 years agoVery high CPU steal after moving instance from eu-west-1 to eu-west-2
asked 3 years agoEC2 Instance is stuck, can't ssh in and abnormal CPU & network utilisation
asked 6 months ago
It's a linux instance (AMI: 099720109477/ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20211129)
What kind of default scheduled activity can be running on the instance?