Why does Nextcloud not Work with MariaDB>10.6?

· 2 min read
Why does Nextcloud not Work with MariaDB>10.6?
Update to 22 failed with database error - Updated
That’s a pretty good idea anyways. I always test new versions of NC and dependencies before I roll them out in “production”. And that although I only use Nextcloud for personal things. But since I also migrated my girlfriend from Goggle to my NC, I can’t afford downtime anymore 😃
Database Incompatibility with MariaDB 10.6.0 · Issue #1492 · nextcloud/docker
Hey! So I updated mariadb, which I use with nextcloud to version alpha 10.6.0. Which this verison this came https://mariadb.com/kb/en/innodb-system-variables/#innodb_read_only_compressed and gave m...

Temporarily disable read-only compressed row in MariaDB:

SET GLOBAL innodb_read_only_compressed=OFF;

Then patch the Nextcloud files manually and start upgrade from inside the container:

$ kubectl -n nextcloud exec statefulset/nextcloud -- /bin/bash
# rsync -rlDog --chown www-data:root --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
# rsync -rlDog --chown www-data:root --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/
# su - www-data -s /bin/bash -c 'php -d memory_limit=-1 /var/www/html/occ -vvv upgrade

To eventually fix this problem, we need to update row type from COMPRESSED to DYNAMIC on all tables. In MariaDB:

SELECT CONCAT('ALTER TABLE `', table_name, '` ROW_FORMAT=DYNAMIC;') AS aQuery FROM information_schema.tables WHERE table_schema = 'nextcloud'

Then execute the output as commands.


Nextcloud might add support for MariaDB 10.6 and fix this issue in later version of 23.

Add MariaDB 10.6 support (drop row_format=compressed) by acsfer · Pull Request #30129 · nextcloud/server
Keeping MariaDB 10.4 too as both versions have some BC breaks, so tests will run on both (for now).

Related Articles

Labels in OpenShift 3 Web Console

Labels are used to match application names and resources in OpenShift 3 Web Console.

· 1 min read
Etcd does not Start after Disk is Full
· 5 min read