[N/A] Database Uptime

I would like a plugin that works with wpmu uptime. This plugin is only there to check that wordpress as a database connection. Uptime on your end will contact this database connection plugin and if it can not make a connection it would mean that wordpress has lost it's database connection and there are issues then need tending to.
At the moment uptime only monitors server response. So if there is a database issue it is not reported even though the site is down.
It's rare to get a lost database connection I know but when you are setting up a new VPS and so on these issues can occur if you have not calculated the resources correctly.
It would not need to be a complicated or bloated plugin as it only has one simple jobs to do and little tweaking your end to uptime.

  • Adam Czajczyk

    Hi Lee

    I hope you're well today and thank you for you this suggestion.

    It wouldn't be that easy though, I'm afraid. A plugin that checks connection with the database wouldn't actually work because WordPress itself goes down when it doesn't have a db connection. So, a database connection goes down, the site doesn't work, thus its not possible to connect to the plugin. That'd be unreliable check and not much different than a current check (header request).

    So, to overcome this there would have to be one of the two other solutions. One of them would be a standalone script on your server that only checks db connection - not being a WP plugin but rather taking connection credentials from wp-config.php file and just trying to connect upon The Hub direct requests. That might pose some security threads tho.

    The other solution would be to just try directly connect to a "remote database" from The Hub but that, on the other hand, is not allowed on many hosts where - due to the security reasons - remote connections to the database are being blocked.

    Having that said, I get your point and can see how handy that could be but I think a plugin for this wouldn't actually work for the task :slight_smile: I'm wondering that maybe a different route could be better - like for example actually fetching and parsing content of the site in case it responds with anything else than proper "200 or 3xx" headers that confirm that site's up.

    What do you think about that?

    Best regards,
    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.