MariaDB 10.2.35 Memory Spikes

On an AWS EC2 T3.large instance I'm hosting a website built with the Cake PHP framework. It utilises the MariaDB version 10.2.35. I'm having an issue whereby the memory for the server is spiking.

When MariaDB starts, it uses a small portion of memory - perhaps a few hundred MB of the total available (~ 8GB). However, I can't seem to find any specific web request that is causing the database memory to spike. Then out of seemingly nothing, the memory usage will spike by a couple of GB until the kernel eventually comes along and kills the MariaDB. This is a little infuriating as there doesn't seem to be an obvious cause for this memory usage. Perhaps someone could assist me in diagnosing this further and looking for what the cause may be.


Solution 1:

Same here on a VPS with Debian 9 and a php web site.

I noted this "new" behavior after upgrade from 10.2.34 (working perfectly) to 10.2.35 (process killed after eating all of available memory, restarted, killed again and so on...). It seems this is not really related to hosting server (or hosting provider) as your host configuration is different from mine. No modification were done on the MariaDB configuration. What I've done was "apt update/apt upgrade". That's all.

At the moment, I had to downgrade to 10.2.34 as a workaround.

The configured deb repo is :

deb http://mariadb.mirrors.ovh.net/MariaDB/repo/10.2/debian stretch main

So, packages are those provided directly by MariaDB. There is the list of packages updated during the upgrade from 10.2.34 to 10.2.35 :

galera-3/unknown 25.3.31-stretch amd64 [upgradable from: 25.3.30-stretch]
libmariadb3/unknown 10.2.35+maria~stretch amd64 [upgradable from: 10.2.34+maria~stretch]
mariadb-client-10.2/unknown 10.2.35+maria~stretch amd64 [upgradable from: 10.2.34+maria~stretch]
mariadb-client-core-10.2/unknown 10.2.35+maria~stretch amd64 [upgradable from: 10.2.34+maria~stretch]
mariadb-common/unknown,unknown,unknown 10.2.35+maria~stretch all [upgradable from: 10.2.34+maria~stretch]
mariadb-server/unknown,unknown,unknown 10.2.35+maria~stretch all [upgradable from: 10.2.34+maria~stretch]
mariadb-server-10.2/unknown 10.2.35+maria~stretch amd64 [upgradable from: 10.2.34+maria~stretch]
mariadb-server-core-10.2/unknown 10.2.35+maria~stretch amd64 [upgradable from: 10.2.34+maria~stretch]
mysql-common/unknown,unknown,unknown 10.2.35+maria~stretch all [upgradable from: 10.2.34+maria~stretch]

It seems to be related to https://jira.mariadb.org/browse/MDEV-24117

And MariaDB published two days ago a new corrected version : 10.2.36