Score:1

MariaDB regularly freezes every 1-2 days

so flag

I'm using MariaDB on Ubuntu 22.04 running on a Proxmox container (LXC). I have two instances for two different services, but since upgrading from 21.10 to 22.04 both instances completely freeze once every 1-2 days.

Trying to restart MariaDB doesn't work, because it's frozen and won't close. For the same reason even trying to reboot the container doesn't work, and the only way to unfreeze it is to manually kill the process (with -9) and restart it.

This has been happening only since I've switched to 22.04, and also happen on a clean install. I've tried to increase ulimits and seting a connection timeout with no result.

Moreover, no error or indication of a problem seem to be logged in either syslog or any of MariaDB's logs.

I've tried searching for solutions but this somehow seems to affect only my setup, so it might be the combination of MariaDB + Ubuntu 22.04 + LXC.

Any suggestion would be extremely welcome since I'm starting to run out of options, other than trying to upgrade to 22.10 hoping for a fix or just moving the database on a VM instead of a CT.

Thanks!

ua flag
Keep a user=root connection into the server that freezes. When it freeses, see if you can do `SHOW PROCESIST;` The _may_ provide clues. If that won't work, have a script that does `mysql ... -e 'show processlist'; sleep 1` in a loop, When the freeze occurs, there may be a clue on the screen.
Marco Fincato avatar
so flag
I tried doing that, and once it freezes `SHOW PROCESSLIST;` only shows an always increasing list of queries (most of them SELECT) that are never executed and are stuck in the "Statistics" state, The UPDATE and DELETE queries instead stay stuck in "Updating".
ua flag
Which query has the largest "Time" value?
Marco Fincato avatar
so flag
It's always a different one. Also I'm encountering the same problem on two different databases, serving two completely different purposes (a Nextcloud instance and a mail server). The only thing they have in common is running in a LXC container with Ubuntu 22.04.
ua flag
Switch to Docker?
Score:0
co flag

Does your containerised MariaDB log to syslog? Some versions of syslog can break in a peculiar way and this can cause a seemingly inexplicable MariaDB freeze after a while.

Marco Fincato avatar
so flag
Unfortunately since I've made this post I ended up moving the DB in a VM, and therefore I'm unable to test if disabling logging to syslog would actually solve the issue. I'll still mark this as the solution since it very well matches the situation I encountered, and therefore there is a high chance this is the solution.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.