Hello, I am running an Ubuntu server with docker on a DigitalOcean droplet. I keep getting notification from DigitalOcean my site was down for 2 minutes every couple of days. My memory is stable around 90/95 % and sometimes it almost reach the 100. Thats probaly the moment the moment the droplet is going down. At this moment there is also a huge increase in cpu (from 5 to 60 %). Does anyone know this has something to do with my droplet in general, ubuntu or usage of my docker containers?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hey!
I would recommend starting by finding out which processes are consuming the most amount of memory, you can do that by following the steps here:
Then you can take it from there and tweak the necessary services. For example, if it is MySQL that is taking most of the memory, you could follow the steps here on how to optimize it:
But in general, if your application just needs more memory, the best thing to do would be to upgrade your Droplet.
Resizing a server changes the resources (CPU, RAM, and disk) that a server has. There are two resizing options for Droplets:
CPU and RAM only. This option lets you change the amount of CPU and RAM available to a Droplet.
Disk, CPU, and RAM. This option lets you change the amount of CPU and RAM available to a Droplet and permanently increase the size of a Droplet’s disk.
In your case, you could just add more CPU and RAM. Increasing a Droplet’s memory and CPU improves its performance and stability, especially when you are already utilizing 95% of the resources.
Hope that this helps!
- Bobby
Heya @rickwagenmakers,
Your Droplet is running out of Memory and thus killing processes or just going down. Running a Droplet at 90/95% RAM all the time is not optimal at all.
You should look into upgrading your Droplet to a bigger one with more RAM and CPU.