Running out of memory sometimes happens on swap-less VPSes, and it seems Webmin (together with its twin, Virtualmin) are among the first processes to die in out-of-memory cases.

Setting up a little script to check for and restart Webmin if it is no longer running is a pretty simple (workaround) solution – but should never replace the proper procedure of adjusting the settings or upgrading the VPS to avoid running out of memory in the future.

Create /etc/webmin.chk with the following contents:

Mark the file as executable:

chmod +x /etc/webmin.chk

Then set up a cron task with the desired periodicity:

*/30 * * * * /etc/webmin.chk >/dev/null 2>&1

This script should work with both CentOS 6 and 7 (and the likes).

One Comment

  1. Thanks for this useful article
    I have a few sites that use my wordpress infrastructure
    I manage them using centos7 / Webmin-Virtualmin.
    but my sites constantly “MySQL Database Server” stops or “BIND DNS Server” stops coming to trouble. When you stop them, you can do what to start automatically.

    Fener

Leave a Reply