Update to next cloud 21.0.2 has get an error

Steps to reproduce

  1. Start Updater
  2. Run the updater
  3. Error on step9

Expected behaviour

I’d expected a working upgrade to 21.0.2, but through this error this hasn’t happened.

Actual behaviour

I got this error:
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.

more detailed:
Update vorbereiten Log-Level auf "debug" gesetzt Wartungsmodus eingeschaltet Reparaturschritt: Repair MySQL collation Reparaturinformation: All tables already have the correct collation -> nothing to do Reparaturschritt: Repair SQLite autoincrement Reparaturschritt: Copy data from accounts table when migrating from ownCloud Reparaturschritt: Drop account terms table when migrating from ownCloud Das Datenbankschema wird aktualisiert Datenbank aktualisiert Doctrine\DBAL\Exception\DriverException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. Das Update ist fehlgeschlagen. Bitte melden Sie dieses Problem an die Nextcloud Community.

If I try to start the upgrade on the terminal, I get this error:
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE. Update failed

Server configuration

Operating system: Debian 10

Web server: Apache2

Database: mariaDB 10.6.1

PHP version: 8.0

Nextcloud version: updated from 21.0.2 R2 to 21.0.2

Updated from an older Nextcloud/ownCloud or fresh install: updated from RC to final version

**Where did you install Nextcloud from:**I installed with downloaded package from the next cloud servers

List of activated apps:

App list Nextcloud or one of the apps require upgrade - only a limited number of commands are available You may use your browser or the occ upgrade command to do the upgrade Enabled: - accessibility: 1.7.0 - activity: 2.14.3 - bruteforcesettings: 2.1.0 - cloud_federation_api: 1.4.0 - comments: 1.11.0 - contacts: 3.5.1 - contactsinteraction: 1.2.0 - dashboard: 7.1.0 - dav: 1.17.1 - federatedfilesharing: 1.11.0 - federation: 1.11.0 - files: 1.16.0 - files_pdfviewer: 2.1.0 - files_rightclick: 1.0.0 - files_sharing: 1.13.1 - files_trashbin: 1.11.0 - files_versions: 1.14.0 - files_videoplayer: 1.10.0 - logreader: 2.6.0 - lookup_server_connector: 1.9.0 - oauth2: 1.9.0 - password_policy: 1.11.0 - photos: 1.3.0 - privacy: 1.5.0 - provisioning_api: 1.11.0 - recommendations: 1.0.0 - serverinfo: 1.11.0 - settings: 1.3.0 - sharebymail: 1.11.0 - support: 1.4.0 - survey_client: 1.9.0 - tasks: 0.13.6 - text: 3.2.0 - theming: 1.12.0 - twofactor_backupcodes: 1.10.0 - updatenotification: 1.11.0 - user_status: 1.1.1 - viewer: 1.5.0 - weather_status: 1.1.0 - whiteboard: 0.0.3 - workflowengine: 2.3.0 Disabled: - admin_audit - encryption - files_external - firstrunwizard - nextcloud_announcements - notifications - systemtags - user_ldap

Nextcloud configuration:

Config report { "system": { "instanceid": "***REMOVED SENSITIVE VALUE***", "passwordsalt": "***REMOVED SENSITIVE VALUE***", "secret": "***REMOVED SENSITIVE VALUE***", "updater.secret": "***REMOVED SENSITIVE VALUE***", "trusted_domains": [ "cloud.*.*", "*.*.*.*", "*.*.*.*" ], "debug": true, "datadirectory": "***REMOVED SENSITIVE VALUE***", "dbtype": "mysql", "version": "21.0.2.0", "overwrite.cli.url": "https:\/\/*.*.*", "dbname": "***REMOVED SENSITIVE VALUE***", "dbhost": "***REMOVED SENSITIVE VALUE***", "dbport": "", "dbtableprefix": "oc_", "mysql.utf8mb4": true, "dbuser": "***REMOVED SENSITIVE VALUE***", "dbpassword": "***REMOVED SENSITIVE VALUE***", "installed": true, "maintenance": true, "theme": "", "loglevel": 2, "mail_smtpmode": "smtp", "mail_sendmailmode": "smtp", "mail_smtphost": "***REMOVED SENSITIVE VALUE***", "mail_smtpport": "25", "mail_smtpauth": 1, "mail_smtpauthtype": "LOGIN", "mail_from_address": "***REMOVED SENSITIVE VALUE***", "mail_domain": "***REMOVED SENSITIVE VALUE***", "mail_smtpname": "***REMOVED SENSITIVE VALUE***", "mail_smtppassword": "***REMOVED SENSITIVE VALUE***", "overwriteprotocol": "https", "trusted_proxies": "***REMOVED SENSITIVE VALUE***", "updater.release.channel": "stable", "app_install_overwrite": [ "whiteboard" ], "twofactor_enforced": "false", "twofactor_enforced_groups": [], "twofactor_enforced_excluded_groups": [], "default_phone_region": "DE", "memcache.local": "\\OC\\Memcache\\APCu" } }

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Safari 14.1

Operating system: macOS 11.3.1

Logs

Nextcloud log (data/nextcloud.log)

Nextcloud log {"reqId":"avpk6SzliVS6VrbPYk3a","level":1,"time":"2021-05-24T09:05:49+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::dbUpgrade: Updated database","userAgent":"--","version":"21.0.2.0"} {"reqId":"avpk6SzliVS6VrbPYk3a","level":3,"time":"2021-05-24T09:05:49+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":{"Exception":"Doctrine\\DBAL\\Exception\\DriverException","Message":"An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.","Code":4047,"Trace":[{"file":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Connection.php","line":1728,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Connection.php","line":1667,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Connection.php","line":1146,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/DB/Connection.php","line":257,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":213,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":287,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/AppConfig.php","line":236,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/App/AppManager.php","line":407,"function":"setValue","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Updater.php","line":375,"function":"disableApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Updater.php","line":259,"function":"checkAppsRequirements","class":"OC\\Updater","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Updater.php","line":132,"function":"doUpgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/core/Command/Upgrade.php","line":255,"function":"upgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/occ","line":11,"args":["/var/www/clients/***/***/***/cloud/console.php"],"function":"require_once"}],"File":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":114,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.","Code":4047,"Trace":[{"file":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":84,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Connection.php","line":1136,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/DB/Connection.php","line":257,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":213,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":287,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/AppConfig.php","line":236,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/App/AppManager.php","line":407,"function":"setValue","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Updater.php","line":375,"function":"disableApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Updater.php","line":259,"function":"checkAppsRequirements","class":"OC\\Updater","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Updater.php","line":132,"function":"doUpgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/core/Command/Upgrade.php","line":255,"function":"upgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/occ","line":11,"args":["/var/www/clients/***/***/***/cloud/console.php"],"function":"require_once"}],"File":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":26,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.","Code":"HY000","Trace":[{"file":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":82,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Connection.php","line":1136,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/DB/Connection.php","line":257,"function":"executeStatement","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":213,"function":"executeStatement","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":287,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/AppConfig.php","line":236,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/App/AppManager.php","line":407,"function":"setValue","class":"OC\\AppConfig","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Updater.php","line":375,"function":"disableApp","class":"OC\\App\\AppManager","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Updater.php","line":259,"function":"checkAppsRequirements","class":"OC\\Updater","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Updater.php","line":132,"function":"doUpgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/core/Command/Upgrade.php","line":255,"function":"upgrade","class":"OC\\Updater","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Command/Command.php","line":255,"function":"execute","class":"OC\\Core\\Command\\Upgrade","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Application.php","line":1009,"function":"run","class":"Symfony\\Component\\Console\\Command\\Command","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Application.php","line":273,"function":"doRunCommand","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/3rdparty/symfony/console/Application.php","line":149,"function":"doRun","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/lib/private/Console/Application.php","line":215,"function":"run","class":"Symfony\\Component\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/console.php","line":100,"function":"run","class":"OC\\Console\\Application","type":"->"},{"file":"/var/www/clients/***/***/***/cloud/occ","line":11,"args":["/var/www/clients/***/***/***/cloud/console.php"],"function":"require_once"}],"File":"/var/www/clients/***/***/***/cloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":82}},"CustomMessage":"--"},"userAgent":"--","version":"21.0.2.0"} {"reqId":"avpk6SzliVS6VrbPYk3a","level":3,"time":"2021-05-24T09:05:49+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::failure: Doctrine\\DBAL\\Exception\\DriverException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.","userAgent":"--","version":"21.0.2.0"} {"reqId":"avpk6SzliVS6VrbPYk3a","level":3,"time":"2021-05-24T09:05:49+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update failed","userAgent":"--","version":"21.0.2.0"} {"reqId":"avpk6SzliVS6VrbPYk3a","level":1,"time":"2021-05-24T09:05:49+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceActive: Maintenance mode is kept active","userAgent":"--","version":"21.0.2.0"} {"reqId":"avpk6SzliVS6VrbPYk3a","level":1,"time":"2021-05-24T09:05:49+00:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"21.0.2.0"} {"reqId":"VBYGxEzJpKnDJidV8ep6","level":3,"time":"2021-05-24T09:10:01+00:00","remoteAddr":"10.0.0.6","user":"--","app":"PHP","method":"GET","url":"/cron.php","message":"Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0","version":"21.0.2.0"} {"reqId":"WSnjYaOHecGKnueJ3GNh","level":3,"time":"2021-05-24T09:15:01+00:00","remoteAddr":"10.0.0.6","user":"--","app":"PHP","method":"GET","url":"/cron.php","message":"Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0","userAgent":"Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:47.0) Gecko/20100101 Firefox/47.0","version":"21.0.2.0"} {"reqId":"GxHPsm0e6OODudhOWhEp","level":3,"time":"2021-05-24T09:15:22+00:00","remoteAddr":"84.147.34.246","user":"--","app":"PHP","method":"GET","url":"/index.php/csrftoken","message":"Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Safari/605.1.15","version":"21.0.2.0"} {"reqId":"GFFxTvMVFzljttr9k1NP","level":3,"time":"2021-05-24T09:16:58+00:00","remoteAddr":"84.147.34.246","user":"--","app":"PHP","method":"GET","url":"/index.php/csrftoken","message":"Zend OPcache can't be temporary enabled (it may be only disabled till the end of request) at Unknown#0","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Safari/605.1.15","version":"21.0.2.0"}

Thanks if there’s anyone who could help :slight_smile:

Have a nice day
Tardar

1 Like

Do you have a possible solution for me that might work?
Thanks a lot :slight_smile:

I’ve run into the exact same problem after trying to upgrade to 21.0.02 and changing the mysql character set to utf8mb4.
What I did is the following:

php occ maintenance:mode --on

on the mysql db (maria 10.6.1):

ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;

then in the app again:

php occ config:system:set mysql.utf8mb4 --type boolean --value="true"
php occ maintenance:repair
Nextcloud is in maintenance mode - no apps have been loaded

 - Repair MySQL collation
     - Change row format for oc_migrations ...
     - Change collation for oc_migrations ...

In ExceptionConverter.php line 114:

  An exception occurred while executing a query: SQLSTATE[HY000]: General error: 4047 InnoDB refuses
   to write tables with ROW_FORMAT=COMPRESSED or KEY_BLOCK_SIZE.


In Exception.php line 26:

  SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or
  KEY_BLOCK_SIZE.


In Statement.php line 82:

  SQLSTATE[HY000]: General error: 4047 InnoDB refuses to write tables with ROW_FORMAT=COMPRESSED or
  KEY_BLOCK_SIZE.


maintenance:repair [--include-expensive]

This is according to the official instructions here:
https://docs.nextcloud.com/server/21/admin_manual/configuration_database/mysql_4byte_support.html

Any ideas?

I think the problem has nothing to do with the utf8mb4 setting but the InnoDB compression setting. I would assume that seting “innodb_compression_default = off” should fix the problem. Check-out the provided link in my previous post.

Hey,

i changed the compression_default to off, but the error exists after this change, too.

Do you have any more ideas ? :wink:

Thanks
Tardar

You might be right that it isn’t related to changing the encoding, but just like tardar says, I get the same error nonetheless even after disabling the compression.
And I’d have thought that the default compression refers to the any new changes, not to the existing tables that have compression on.

[later edit:]
It seems it was related after all to the enconding.
So what I did was:

docker exec -it --user www-data next-app php occ config:system:set mysql.utf8mb4 --type boolean --value="false"

Then I came across another error:

In ValidatePhoneNumber.php line 64:

  Can not validate phone numbers without `default_phone_region` being set in the config file

I edited config/config.php and added:

  'default_phone_region' => 'NE' # choose some country; the important thing is that you define it.

And then I ran the repair command again and turned off maintaince:

docker exec -it --user www-data next-app php occ maintenance:repair --include-expensive
docker exec -it --user www-data next-app php occ maintenance:mode --off

Now I’m also able to install apps (which threw the same error in the GUI before this)

The only problem I now have is the warning (in settings - overview) that led to all this in the first place:

MySQL is used as database but does not support 4-byte characters. To be able to handle 4-byte characters (like emojis) without issues in filenames or comments for example it is recommended to enable the 4-byte support in MySQL. For further details read

2 Likes

Hey, i found this one:

You can switch this off and next cloud works again.

Maybe not the best solution, but it works :slight_smile:

4 Likes

Thanks for the tip.
I just don’t understand the logic though, I don’t understand what’s happening when nextcloud upgrades the application. Does it set the row_format to compressed and then it tried to change them even though they’re read only?
Doesn’t make much sense :slight_smile:

As MariaDB 10.6.3 has now been declared stable this could become an issue for a lot of people quickly.

Mitigated it for now by switching all tables to DYNAMIC.

I have experienced this error on a brand new install of Nextcloud 22 with MariaDB 10.6.2, both in Docker containers, so it’s not just upgrades which cause the error. Nextcloud is not functional at all.

I’m not sure how to deal with it other than using MariaDB 10.5.11 instead. I’ll see if it’s possible to pass the command line options to turn this off to the MariaDB container.

Edit: Swapping to MariaDB 10.5.11 solved the issue for me. Not ideal but it works

Is this issue going to be addressed in a new maintenance release of both 21 and 22 branches?

One can easy avoid issues like that by not upgrading to new MariaDB, PHP and even new Nextcloud major releases on day one. I have long since moved to a more conservative strategy when it comes to upgrading Nextcloud and it’s main dependencies. This way I was able to avoid many of the problems that came up here in the forums. I am still on NC 21.0.3, MariaDB 10.3 and PHP7.4 on my production instance and I run a seperate instance, where I test new versions of Nextcloud and it’s dependencies before I upgrade my main instance.

Why is that nod ideal? As for MariaDB, each major release is supported for 5 years. And Nextcloud itself always supports at least the two or three latest versions of MariaDB. So there is no reason to upgrade immediately just because there is a new number on it. :wink:

I was hit by this too today since the mariadb:latest docker image got bumped to 10.6.3. :fearful:
Doing a image: mariadb:10.5 helped!

See: mariadb needs to be locked to 10.5 · Issue #1536 · nextcloud/docker · GitHub

5 Likes

Thank you guys!

For whatever reason I even had a wrong charset/collation

MariaDB [nextcloud]> show variables like 'innodb_file_per_table';
+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| innodb_file_per_table | ON    |
+-----------------------+-------+
1 row in set (0.004 sec)

MariaDB [nextcloud]> SELECT @@character_set_database, @@collation_database;
+--------------------------+----------------------+
| @@character_set_database | @@collation_database |
+--------------------------+----------------------+
| latin1                   | latin1_swedish_ci    |
+--------------------------+----------------------+
1 row in set (0.002 sec)

MariaDB [nextcloud]> ALTER DATABASE nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
Query OK, 1 row affected (0.001 sec)

MariaDB [nextcloud]> SELECT @@character_set_database, @@collation_database;
+--------------------------+----------------------+
| @@character_set_database | @@collation_database |
+--------------------------+----------------------+
| utf8mb4                  | utf8mb4_general_ci   |
+--------------------------+----------------------+
1 row in set (0.001 sec)

Without dowgrading to image: mariadb:10.5 or running with command --skip-innodb-read-only-compressed I run also into, when reprairing
docker-compose exec --user www-data app php occ maintenance:repair --include-expensive into:

     - ERROR: An exception occurred while executing a query: SQLSTATE[22007]: Invalid datetime format: 1366 Incorrect string value: '\xF0\x9F\x8E\x82 V...' for column `nextcloud`.`oc_calendarobjects_props`.`value` at row 29

This resolved my problem, thank you!

1 Like

set
innodb_read_only_compressed=0
in your mysql config.

4 Likes

Add --innodb_read_only_compressed=OFF after the run command or add command: ['--innodb_read_only_compressed=OFF'] to your docker-compose file. Thanks to @tardar for finding this!

6 Likes

Thank you! Fixed it for me! :>

works 4 me. Thank you! @tardar @Derkades