Auto Restarting a Failed MariaDB instance

Last Updated on

Occasionally MariaDB hard stops due to a variety of issues –  most of the time this is memory related.  A lack of memory.  The remedy is adding more physical ram or increasing swap space.  Also it is prudent to have the service restart automatically on failure until the memory issue can be resolved.  We can do this easily by creating a Cron job with Webmin.  This assume you have Webmin installed, if not this will explain how – otherwise we can also create this job from the command line.

Clicking on Scheduled Cron Jobs will present the following interface; simply create the job as illustrated below.

The command systemctl start mariadb will now run every minute and restart a failed MariaDB instance(s).

Lima

About the author

Lima is the visual nautical indicator for "stop instantly."

Comments

Leave a Reply