Skip to content

AWS lightsail need reboot every ten hours

1

I encountered the problem that my Amazon lightsail instance cannot be connected after every 10 hours. I tried the ssh console in the AWS online console as well, but I can only see black window. After rebooting, everything is OK. it's really annoying because I have to manually reboot it every 10 hours and I have to restart all the services which makes it very hard to use.

Is it related to the CPU usage because I observed in my service sometimes the CPU usage will exceeded the sustainable zone. Will it cause the machine to be unreachable?

asked 10 months ago184 views
2 Answers
1

The issue you're experiencing with your Amazon Lightsail instance becoming unreachable every 10 hours is likely related to CPU usage. Lightsail instances use a burstable performance model, which means they have a baseline CPU performance with the ability to burst above that baseline for short periods.

When your instance consistently consumes more CPU than the plan provides as a baseline, it can lead to performance issues, including the instance appearing unresponsive or unreachable. This is especially true for smaller Lightsail plans, where the CPU burst capacity can be quickly depleted if the usage consistently exceeds the baseline.

You mentioned observing that the CPU usage sometimes exceeds the sustainable zone. This is a strong indicator that your instance is consuming its CPU credits. Once these credits are depleted, the instance's performance drops to the baseline level, which can cause connectivity issues and make the instance appear unresponsive.

To address this issue, you have a few options:

  1. Scale up your instance: If your application consistently requires more CPU resources than your current plan provides, consider upgrading to a larger Lightsail plan with higher baseline performance and more CPU credits.

  2. Optimize your application: Try to identify and disable any unnecessary resource-consuming processes. For example, if you're running a WordPress site, certain plugins or custom themes might be consuming excessive CPU in the background.

  3. Monitor your instance: Keep a close eye on your CPU usage and burst capacity using Lightsail's built-in monitoring tools. This can help you identify patterns and make informed decisions about resource allocation.

  4. Implement an auto-reboot solution: While not ideal, you could set up a system to automatically reboot your instance when it becomes unresponsive. However, this should be considered a temporary solution while you work on addressing the root cause of the high CPU usage.

Remember, the goal should be to address the underlying cause of the high CPU usage rather than relying on frequent reboots, as this can lead to service interruptions and potential data loss.

Sources
LightSail WordPress Needs Reboot | AWS re:Post
How can I reboot lightsail instance using cloudwatch or something? | AWS re:Post
Lightsail instance becomes inaccessible periodically until reboot, but instance keeps running | AWS re:Post

answered 10 months ago
AWS
EXPERT
reviewed 10 months ago
0

Definitely seems like your instance is undersized for the workload. A first step should be to increase the instance size.

Hope this helps!

AWS
EXPERT
answered 10 months ago
EXPERT
reviewed 10 months 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.