MariaDB crash (version 10.3.39)

Hello.
I have a VPS server (OVH) and I have installed Virtualmin 7.10.0 with several sites but MariaDB 10.3.39 crashes regularly for no reason at different times and I can’t find anything to solve this major problem … Could you please give me a clue?

You’ll need to provide some more info to start with.

What are your vps specs? Is your ram getting exhausted? Do your system logs mention “OOM” (out-of-memory)? Did this start happening after a change? Maybe an update or adjusted configs? Are you using swap/virtual memory? What apps are you running?

Feel free to add any and all info not covered by these questions but you feel might be relevant.

This is pretty much always the OOM killer. Mariadb doesn’t crash absent something going horribly wrong (and running out of memory is something going horribly wrong).

There is always a reason!

it usually can be found in your logs.
Welcome to the forum.
Of course it is always helpful to everyone if you follow the simple prompt for system information when you start too post something.

There are many folk on here who use MariaDB v10.3.39 every day.

Assuming this is not a simple lack of available memory, it is most likely to be caused by some web application you have installed that is corrupt and breaking the database. (so again we need more information!)

Thanks for your answers, it’s really nice.

My server is :
Intel core 4 cores
16 GB RAM
160GB Disk
Ubuntu Linux 22.04.4
Webmiin 2.111
Virtualmin 7.10.0
18 databases (18 wordpress sites) on it, and memory usage averages 70%: I don’t think it’s related, but I’m not sure.
No particular change in the last year or so, unfortunately…
I no longer use SWAP (deleted) but that doesn’t change anything, it crashes the same)
I don’t see anything in the system logs but I’ve been focusing on the mysql LOGs… where can I find the virtualmin LOGs?

I don’t know “OOM KIller”, where can I find it in my files?

I have 4 VPS (servers) and all 4 crash randomly from time to time (one more than the others).

Sorry for my English, I’m French :slight_smile:

Thanks

actually, in the LOG I found “error and critical messages”, I have “out of memory” messages … my memory is saturated and Mariadb restarts you think?

Hello,

Please check this tutorial out:

That certainly sounds big enough, far bigger than all of my VMs) (including those running production VS.

I would concentrate on the worst one. solve that and you have a good idea where to look.

I would start by looking in Virtualmin (select the VS from the dropdown list) -> Logs and Reports -> PHP Error Log (I am assuming you have enabled PHP logging). This is because so many times this ends up being a fault of one of the plugins dragged into WordPress.

/var/log/virtualmin/brokendomain.com_error_log

The OOM killer is a kernel feature. So, you’ll find it in the kernel log (dmesg or possibly journalctl -k).

The OOM killer has nothing to do with Virtualmin. It’s a kernel feature, you won’t find messages about it in the Virtualmin logs. Virtualmin doesn’t have its own log, they go to the Webmin logs (in /var/webmin), and the web server logs, both access and error, for Virtualmin managed domains usually appear in /var/log/virtualmin.

You say you have 16GB, but then you say you have four VMs running on this system…so, obviously none of them have 16GB. Stuff running in a VM is limited to whatever RAM the VM has been given, it can’t use the whole systems memory. So, you need to talk about the memory available to the VM(s) where you see the problem.

OP’s Mariadb is being killed. That won’t show up in a useful way in the web server logs. It’s too far away from the root cause. (It’ll just show what they already know, that Mariadb is unavailable.)

Indeed in my LOG files, I find “PHP Warning: Failed to set memory limit to 10485760 bytes (Current memory usage is 16777216 bytes) in Unknown on line 0” because of my configuration of the “.user.ini” file with like details “upload_max_filesize = 10M
post_max_size = 10M
memory_limit = 10M”
I assume the 3rd line is an error that I need to remove? but could it be my MariaDB crashing problem you think?

Thanks !! great :slight_smile:

In fact, I have 4 different servers with 4 virtualmin each with this configuration

I hate to disagree with @Joe but I always come at OOM issues from the perspective of “If there is enough memory on the bare metal then something is eating up all the memory” if it wasn’t that simple we would all be having the problem - we are not! Virtualmin is reliable and so is MariaDB therefore something has been introduced that is breaking it.

That is why I approach these problems from the most likely cause - the app that is using the database. Or to be more specific the code that is running that app. i.e. PHP

If you kill/suspend that app I think your OOM issue will be resolved. (at least temporarily for that domain.)

I am convinced it will come down to bad coding of something in PHP that is attempting to do something bad with your database. as simple as a select * from big table and not handling the results correctly

and just to state that although I am no longer an advocate of PHP - I accept the same coding blunders can be made in other languages

I went to read the LOG files and made some adjustments but nothing changes … my RAM memory is probably saturated with too many sites on it (about 18) I guess…

Perhaps time to stand back and think it through from the start.

Perhaps an new test VM - remember there are many of us running Webmin/Virtualmin with just as many sites (if not more) and are not experiencing your problem. So a new clean install on a test VM puts you in that position. Then do a test transfer of the suspect site to see what happens - does the OOM error reappear?

I’ll keep looking and keep you posted. Thanks

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