Prevent server down (services stopped?) on AWS (and any)

SYSTEM INFORMATION
Debian Linux 10
Virtualmin 7.1-1

Hello,

I’ve noticed that on a few AWS hosted server, sites and sometimes Virtualmin become unresponsive.

I can’t find a clear pattern. Sometimes only MariaDB is down and I just have to start it. Sometimes I have to restart webmin from the shell and sometimes I have to reboot the instance (I even don’t have SSH access) from the AWS console.

I guess that as light safety process I could set a cron to restart services everyday at midnight or so, but I was wondering if there is something clever already available in Virtualmin… or what would be best practice for such problem.

See

https://doxfer.webmin.com/Webmin/System_and_Server_Status

Thank you again dear friend. :wink:
I will read and experiment.

While I could set it rightly on a one virtualmin instance (thank you Calport), a second instance is reluctant and nothing is proposed below a certain line (seems something is missing).

I reinstalled Virtualmin a second time (I upgraded to Debian11) on a new Lightsail AWS instance, but still… like something is missing.

Back to my initial issue even after I proceeded to a brand new installation from scratch… :man_shrugging:t2:

SYSTEM INFORMATION
OS type and version Debian Linux 11
Webmin version 2.001
Virtualmin version 7.2-1
Related packages -

Background:
I installed 3 AWS Lightsail instances with Debian 10/11, MariaDB and Virtualmin.
All are setup the same and I even published a short Tutorial to help other users (tutorial)

Those instances are in separate accounts and in different locations.

The issue:
I have one instance in Paris, Zone A (eu-west-3a) and this is the one I have to manually restart MariaDB regularly. I deleted it and re-install everything from scratch but I still have the issue.

Any help to understand why MariaDB keep shutting down on this specific instance will be appreciated.

Three AWS Lightsail instances in three different locations: the Paris instance should run (or should I say sail :slight_smile: ) as smoothly as the other two.

Is there an app or something hosted in the Paris instance which is causing the MariaDb to crash?

I am not surprised at MariaDb crashing on a Lightsail instance. These are designed to be limited in the amount of resources that they are allowed to consume.

But the other two Lightsail instances are running fine. Which brings me back to the question - what’s unique about the Paris Lightsail instance?

Thank you for helping. I needed to refresh my mind and restart diagnostic from the start.
I created a different thread about Scheduled Monitoring.

I agree what you said about those “light” instances and I don’t complain when once in a while I have to restart Webmin on one of the working instances (note that the hosted Tiki/MariaDB is published 24/7).

Trying to details the diagnostic, the instances were all installed following this exact procedure : Tiki Wiki CMS installation on Amazon Lightsail instance with Debian11, MariaDB, Git and Virtualmin/Webmin control panel

The one in Paris, Zone A (eu-west-3a) was Debian10 and had the issue that started this thread.
A few days I create a new instance (delete the previous one) with Debian11 and have the exact same issues:

  • MariaDB shutdown regularly
  • I can’t set up a Scheduled Monitoring

Comparing with a working server.
Working server:

System Information

|Operating system|Debian Linux 10|
|Webmin version|1.994|Usermin version|1.840|
|Virtualmin version|7.1-1|Authentic theme version|19.93.1|

  • Apache Webserver
  • PHP-FPM 7.3.33 Server (off)
  • PHP-FPM 7.4.30 Server
  • PHP-FPM 8.0.23 Server (off)
  • PHP-FPM 8.1.10 Server (off)
  • BIND DNS Server
  • SSH Server
  • MariaDB Database Server

This server is located in South America and up 99.9% of the time.


Server with the issue;

System Information

|Operating system|Debian Linux 11|
|Webmin version|2.001|Usermin version|1.860|
|Virtualmin version|7.2-1|Authentic theme version|20.01.1:5|

  • Apache Webserver
  • PHP-FPM 7.4.30 Server
  • BIND DNS Server
  • Postfix Mail Server
  • Dovecot IMAP / POP3 Server (off)
  • SSH Server
  • MariaDB Database Server

Note; I see I have to update the working server but I keep it that way as long as I didn’t solve the issue.

In this page, you say:

It is important to install and setup MariaDB before Virtualmin.

Well, no. I do not do this. I run the Virtualmin install script on a server which has a fresh, bare-bones OS installed and then the Virtualmin install script installs whatever it needs.

This deviation from procedure may not be the reason for the issue you are experiencing with db server crashing randomly but it is strictly taboo to install anything on a server before Virtualmin is installed.

Additionally, I keep antivirus and fail2ban disabled on low resource Virtualmin servers. Could you disable these and see if the problem goes away?

Also see:
https://www.virtualmin.com/documentation/system/low-memory/

Hello,

I read you about installing Virtualmin on a fresh OS instance. :pray:
I guess I read that MariaDB should be installed first somewhere at some point and keep with this.
I will recreate an instance retest and correct the tutorial and report here in a few day if it solved the issue.

fail2ban is not installed (no email on this server) and I couldn’t find anything about antivirus. (probably because nothing is set about email on this minimal install).

The VM script installs everything, do NOT install anything else on a fresh instance, maybe just do a update.

1 Like

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