1

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!

  • 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. – Rick James Oct 30 '22 at 04:42
  • 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". – Marco Fincato Nov 09 '22 at 11:01
  • 1
    Which query has the largest "Time" value? – Rick James Nov 09 '22 at 22:55
  • 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. – Marco Fincato Nov 11 '22 at 10:00
  • Switch to Docker? – Rick James Nov 11 '22 at 18:25

1 Answers1

0

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.

Gordan Bobić
  • 971
  • 4
  • 11
  • 1
    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. – Marco Fincato Aug 01 '23 at 09:24