Mysql stopped. Virtualmin autoreboot function ?


For years, I used a simple VPS without any control panel, just a wordpress installation in a website
From time to time, the website is an error, MYSQL stopped, or Apache stopped, and then, the website is not working.
It’s not a virus or malware, just something, it happens.

Now, installed Webmin/Virtualmin in the VPS, and i want to know if Virtualmin detects when mysql, apache is stopped, and reboot them automatically ??!!

Thank you by advance for any help

Instead of looking a way to auto-restart failing software you should look for the reason why is this happening. Most common reasons are:

  1. Your server went OOM and then it kills biggest processes, usually thats Apache and/or MySQL.
  2. Wrong configuration with Apache and (more often) MySQL what eats up all your memory (or CPU).
  3. Bad coding with some of your plugins or theme, or it could even be your WP is hacked and used for something else, e.g. running a botnet.

Best thing to begin is to check your log files and see if you can find anything what could explain why is this happening with your server. Either way you will need to post more info if you want someone to try to help you.


Any idea if such feature is already integrated in virtualmin ?

What feature? Auto-restart doesn’t make sense at all if the OOM killer is why the process is dying. You need to fix the memory problems.

You can configure the Webmin System and Server Status module to perform any action when a service goes down, including doing a “service mysqld restart”, or whatever you like, after a failure event. But, again, you need to fix why it is failing, not just tell it to restart… Having MySQL killed at random can lead to data loss (depending on how your app behaves when the database drops out from under you).


Thanks all for the answer.
Yes, of course, i’ll monitor why the service is falling. But during the time of the analysis, i do not want the service is online. In “Server Status”, i can setup it, and receive a warning email, exactly what i’m looking for

Thank you again