- Newest
- Most votes
- Most comments
After further investigation I found that Ubuntu does not create any swap file by default and, therefore, it makes sense that the system would crash if memory usage hits max capacity. I have now created a swap file for my machine and will continue to monitor to see if this resolves the issue. I suspect it will.
It might well be the case that there are some CPU spiker making the instance unstable. Monitor CloudWatch metrics like CPU utilization, memory usage, and network traffic to identify what is causing the spikes. The CloudWatch agent can help with this.
Check for any processes running on the instance that may have memory leaks or are consuming excessive resources over time.
Verify application configuration and resource usage to ensure it can handle the expected traffic levels.
Consider upgrading to a more powerful Lightsail instance tier if the workload demands higher resources.
As a last resort, migrate the application to EC2 where you have more control over resources and scaling options if needed to handle spikes.
Thanks for the reply. I'm inexperienced with Linux. Can you tell me how to view logs about when the crash may have occurred and perhaps more details? I also suspect it's RAM or CPU usage hitting a limit but would that cause the whole OS to crash normally?
Hi, there, There are several instance metrics available such as CPU utilization and Burst capacity, you can find out details about these metrics from this doc: https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-viewing-instance-health-metrics.html
Also, Lightsail instances provide a baseline amount of CPU performance and have the ability to temporary burst the performance. If you used up all your CPU burst capacity, your instance will no longer be able to burst the performance. Check this doc for more details about Lightsail instance burst capacity: https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-viewing-instance-burst-capacity.html
Thank you
Thank you for that information. I understand how the cpu utilization may reach some capacity and slow things down perhaps. Or perhaps RAM capacity could reach a limit. But should those limits cause the server to crash or just slow down until they can catch up?
I suspect it’s most likely RAM usage. Is there a swap file or virtual memory by default that would help out if going over available memory? How would I check that configuration?
Relevant content
- asked 5 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 3 months ago
It has now been a while since creating the swap file and I've confirmed that the system is no longer freezing. Creating a swap file fixed the issue and this makes sense, I was just unaware that Ubuntu did not have a swap file by default.