- Newest
- Most votes
- Most comments
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:
-
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.
-
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.
-
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.
-
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
Definitely seems like your instance is undersized for the workload. A first step should be to increase the instance size.
Hope this helps!
Relevant content
- asked 4 months ago
