Errors after upgrade from schema version 46 to 47 - The total number of locks exceeds the lock table size

Hi,

After the upgrate to the latest 2024.9.x version the database needed some migration but the ended with an error: The total number of locks exceeds the lock table size

After some goolge search I apparently found some hints to changing the configuration, but I have no idea how to access or even find the configuration in home assistant supervised installation ?

Thanks

3 Likes

How big is your database?

What were the hints? Any url?

If it helps anyone else, I was using mariadb v10 (mariadb:10.11.2-jammy). I upgraded to latest (11.5.2-MariaDB-ubu2404), and I added the following to my custom.cnf file:

[mariadb]
innodb_buffer_pool_size = 512M
innodb_lock_wait_timeout = 300

I’m not sure which change impacted it, but i read the lock issue was more prevalent within v10 installations ( ER_LOCK_TABLE_FULL — MariaDB Documentation)

My database is ~27GB:

and it took about 30-40mins to complete the upgrade from 46->47 (on NVMe).

image

Hope this helps someone else as I’ve been trying to fix it for a few days now! Give me a like if so! :slight_smile: