- 最新
- 最多得票
- 最多評論
Hello.
How CPU utilization goes this much up?
"t2.micro" is an instance type with very low specifications, so if you run a database or other applications permanently, the CPU usage will increase quickly.
https://aws.amazon.com/ec2/instance-types/t2/?nc1=h_ls
Also, "t2.micro" can temporarily increase performance by consuming CPU credits, but once the CPU credits are consumed, the performance will drop to the baseline throughput.
As a result, the application is overwhelmed and a 504 error is occurring.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-credits-baseline-concepts.html
When it goes up to 99% or comes to this state, how I can restart the instance automatically? OR How I can reject those requests to handle this situation?
You can set EC2 actions when creating a CloudWatch alarm for CPU usage by following the steps in the document below.
EC2 actions include restart, so if you select restart when configuring, you can restart when the CPU usage exceeds the threshold set in the CloudWatch alarm.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/UsingAlarmActions.html
相關內容
- 已提問 6 個月前
- AWS 官方已更新 1 年前
- AWS 官方已更新 1 年前