Services using 3+GB memory on a 512MB droplet

Posted February 14, 2016 2.9k views
NginxUbuntuMySQLApachePHPDigitalOceanControl Panels

So I have VestaCP webpanel running on a 512MB droplet.
Worked great for months. Now I have a new droplet, installed VestaCP the same and MYSQL is doing some funky stuff, It’s giving me an error “Connection for controluser as defined in your configuration failed” and it’s using 2GB memory while I have only 512MB. I can’t add any new databases and the existing databases are very slow. How is this possible?
Also, Apache is using 1GB..

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.

Submit an Answer
2 answers

Hey there,

It sounds like you may be running on swap currently and running out of memory and swap. You can take a look at your current memory and swap usage by using the free command. Using swap is not necessarily recommended and it’s certainly not a replacement for memory. You may want to optimize your MySQL and Apache services to use less memory if possible. Regardless in your current state, it doesn’t sound like 512MB is enough memory for your configuration. You can perform a flexible resize to increase CPU and RAM resources, and you can always downgrade back to the smaller sized Droplet as long as you chose a flexible resize.

Happy coding,

Jon Schwenn
Platform Support Specialist

Hi why is using SSD’s swap as ram not recommended? We have been using the same for quite some time and didnt have any issues.