MySQL and Webmin going down due to low memory

OS type and version Debian 10
Virtualmin version GPL

So, I fired up a Droplet on Digital Ocean with 2 vCPUs and 2 GB of RAM, which is double the amount I used to have on my former reseller hosting. I installed Virtualmin on it, and after transfering my first WP website there, the server started crashing due to low memory (According to logs)
Mainly, webmin service and mysql simply stop and don’t come back on their own, even after I set up 4GB of swapfile (Which wasn’t present before) it’s still getting low memory errors.
I had 30~ sites on the reseller hosting with only 1 vCPU and 1 GB ram, so I found it strange that the site is using that much memory and crashing servers.

What do I have to do to make the server more reliable, not to run out of memory anymore (without alocating more RAM on the VPS) and to auto-restart those servers on crash?

Kind regards and thanks in advance!


Were you using Virtualmin in the former hosting environment? Let’s make sure we’re comparing “apples” to “apples”.


No, sorry for not mentioning that before, it was a WHM/Cpanel reseller hosting, I think it was on Cloudlinux, but I’m not sure about the OS

I thought that double the CPU and memory would be enough, was I wrong? Should I configure the VPS in another way?


Alright, that does make a bit of a difference.

CloudLinux is cPanel’s own linux distro, which is likely optimized for their software. Also cPanel has a VPS specific edition which again is optimized such an environment.

Generally speaking, while you should be able to use Virtualmin on a smaller VPS size, I recommend if you intend to run a “full stack” (web, dns, email, dbs) and especially when running WordPress which itself can be resource intensive, you consider a droplet with 4GB memory which again from my experience provides a smooth operation.

Also, you could consider disabling ClamAV which can be a bit resource intensive, along with doing a bit of optimization of your overall configuration disabling features you aren’t using, and optimizing those which you are.

The problem when you try to support a wide array of user types is that you DO need to conduct post install optimization to ensure you are getting the best performance and utilization possible.

When setup correctly, Virtualmin DOES run quite smooth :slight_smile:

I’ve been using Virtualmin since it’s inception, and have installed, and optimized dozens of environments from simple “full stack” to “divide and cluster” setups.

If you don’t mind spending a few bucks, I can help you accomplish a well refined system.

*** Professional, Affordable Tech Support: ***

1 Like

cloudlinux is a linux distro…cpanel is a control panel by another country. cloudlinux now has its own rhel distro called almalinux. HOnestly, 2gigs for a webmin system is not enough. If you are determined though reset your droplet and when you reinstall Linux and virt…select the small system…that should work better. If this is only for you that might be sufficient. if you are hosting others…i would find a dedicated server with as much ram as you can find. My system(physical dedicated server…not a cloud instance) has 64 gigs of ram right now…and once i put about 50 more clients on it i’ll either upgrade the ram or get another dedicated server.

I’ve done many Test installs on Vultr with 1 Gig ram and installs fine. But I never installed WP. Is it a large WP site?

What is consuming memory?

Are you using ClamAV?

1 Like

See How many websites can be hosted on 4 cores, 16 GB RAM Virtualmin server

Also answer Joe’s question: what exactly is taking up memory on your system? The top command will tell you.

Peter / @tpnsolutions know his onions and is best equipped to help you professionally.

1 Like

As @calport mentioned, Peter @tpnsolutions is a guy that you can hire that can sort your issues quickly.

I’ve run multiple Wordpress sites on a server that size and been just fine. A lot of issues with Wordpress are caused by the template used and plugins used. Some of them are coded so very badly (and corruptly, I might ad) that they can overload even the best of servers.

Things to check: Caching plugins. If you’re using one, check it’s memory usage and SQL requests. I’ve seen some sites shut down completely not just from memory usage but SQL requests as some providers put limits on how many you can have. (Example: the base server at IPower limits requests to 25,000 per hour. A basic e-commerce site on a bad template with bad caching will shut the site down if it’s even remotely active.)

Themes: if you’re using a “free” theme, odds are it’s sucking your system dry. Avoid “free” themes as most are programmed by the providers to constantly send out usage statistics to them on top of constant update request and the requirement to use “their plugin packages” to make the theme work which of course produces even more of the same usages.

There’s a LOT that can be causing the issues. I highly recommend you shell out a few bucks and let Peter take a look at it.

Thanks for all the replies! I decided putting 4Gb of swapfile, which apparently did improve it significantly and also put 4gb of RAM instead of two, so I’ll transfer my other websites and see how will the server handle them.

ClamAV and SpamAssassin were already disabled, and I also set up Cloudflare on the site I had on it as well, so I hope it’ll run fine :grin:

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.