Problem with ec2

0

The problem is that I have ec2 and I host my discord music bot there via the pm2 module and after about two days this vps freezes and an error pops up and I have to reset the entire machine to make it work. The system is Ubuntu 22.04 and I am using the free tier. Can I somehow fix this or find the cause of the problem?

Gerdo
asked 3 months ago374 views
2 Answers
0
Accepted Answer

As per your screenshot, CPU is about 15% with CPU credits balance decreasing before it freezes. Baseline CPU for t2.micro for is about 10%, the credits may be exhausted when this happens. You can change T2 instance to Unlimited mode. This may incur additional charges if your average utilization over a rolling 24-hour period exceeds the baseline utilization of the instance.

t2.micro has 1 vCPU and 1 GB RAM. Another reason could be your applications exhausting all available memory and/or available disk space resulting in errors. To monitor memory and disk space usage, you can install CloudWatch agent as per How can I send memory and disk metrics from my EC2 instances to CloudWatch?

Alternatively, you may qualify for t4g free trial. t4g.small has 2 vCPU and 2 GB RAM. However, you will need to create a new Ubuntu instance, and your application must support arm64 architecture. More info in FAQ

AWS
EXPERT
Mike_L
answered 3 months ago
0

Hello.

What is the CPU usage and memory usage?
In particular, t2.micro, which can be used in the free tier, runs while consuming something called CPU burst credits when the CPU usage rate is high.
Once these CPU burst credits are consumed, the CPU performance will drop to the baseline throughput, so there is a high possibility that the performance needed to run the application will not be fully utilized.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/burstable-credits-baseline-concepts.html

profile picture
EXPERT
answered 3 months ago
profile pictureAWS
EXPERT
reviewed 3 months ago
  • I monitored the instance resources and I don't see anything wrong, maybe I don't see any problem, that's why I wanted to find out if there is any error with the resources of my instance! you can see a small break there and this is the moment of restarting the machine. before this small break is the moment when the problem occurred. Screenshot of resource monitor: https://files.fm/f/6v3zr63pvb

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions