By using AWS re:Post, you agree to the AWS re:Post Terms of Use

My t2.micro instance suddenly becomes unreachable after some hours

0

I am hosting a small minigame server. It works perfectly fine, however after certain period of time, my server shuts down and when i try to access my instance (through ssh) it is unresponsive. The only fix is to reboot the instance from AWS console and only then i can access the instance and start my minigame again. At first i thought it was CPU credits limitation, so i tried t3.micro and set it to unlimited CPU credit, however, t3.micro also showed similar behaviour unfortunately :/ My question is, why does this happen and is there any measures or logs i can obtain or find to find the true cause?

asked 20 days ago38 views
1 Answer
1

The issue you're experiencing with your t2.micro and t3.micro instances becoming unreachable after some time is likely related to resource constraints, even though you've tried to address the CPU credit limitation. Here are some potential causes and steps you can take to investigate:

  1. Memory exhaustion: While you've addressed CPU credits, your minigame server might be consuming all available memory, causing the instance to become unresponsive. T2 and T3 micro instances have limited memory (1 GB), which may not be sufficient for your application.

  2. Swap space: If your instance doesn't have swap space configured, it might crash when memory is exhausted. Adding some swap space could help manage memory usage and potentially prevent crashes.

  3. Network or I/O issues: High network traffic or disk I/O could cause the instance to become unresponsive.

To investigate the root cause, you can:

  1. Monitor CloudWatch metrics: Check CPU utilization, memory usage, network in/out, and disk I/O. This will help you identify if any resource is consistently maxed out.

  2. Check system logs: After rebooting the instance, examine the system logs for any error messages or warnings that occurred before the crash.

  3. Use the EC2 Console Screenshot Service: This can provide a screenshot of the instance's console output, which might reveal any error messages during the unresponsive state.

  4. Consider upgrading: If resource constraints are the issue, consider upgrading to a larger instance type that can handle your workload more consistently.

  5. Application logs: Check your minigame server logs for any application-specific errors or resource-intensive operations that might be causing the instance to become unresponsive.

By gathering this information, you'll be better equipped to identify the true cause of the issue and take appropriate measures to resolve it, whether that involves optimizing your application, adding more resources, or choosing a more suitable instance type for your workload.

Sources
Common screenshots to troubleshoot unreachable Windows instances - Amazon Elastic Compute Cloud
t2.micro crashing whenever I access with VScode | AWS re:Post
Instance stop working | AWS re:Post
AWS instance intermittently unresponsive behavior | AWS re:Post

profile picture
answered 20 days ago
profile picture
EXPERT
reviewed 20 days ago

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