MariaDB Upgrade from 10.5.11 to 10.6 causes Internal Server Error

Nextcloud version (eg, 20.0.5): 21.0.3
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.2 LTS
Apache or nginx version (eg, Apache 2.4.25): Nginx 1.21.1
PHP version (eg, 7.4): 7.4.21

The issue you are facing:

I am running my Nextcloud instance with docker-compose. When I upgrade MariaDB to the latest version (10.6, or image: mariadb:latest) I get an internal server error.

The error (posted below) is still present when I’m using MariaDB 10.5.11, but I can login and use Nextcloud just fine with no issues. At 10.6, I get the same error but I cannot login and I see the Internal Server Error page. EDIT: I don’t think this is true.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Upgrade MariaDB to 10.6
  2. Try to login to Nextcloud

The output of your Nextcloud log in Admin > Logging:

[index] Error: OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1036 Table 'oc_preferences' is read only at <<closure>>

0. /var/www/html/lib/private/DB/ConnectionAdapter.php line 77
   OC\DB\Exceptions\DbalException::wrap(Doctrine\DBAL\Ex ... {})
1. /var/www/html/lib/private/AllConfig.php line 356
   OC\DB\ConnectionAdapter->executeUpdate("DELETE FROM `*P ... ?", ["*** sensitive  ... "])
2. /var/www/html/lib/private/User/Session.php line 875
   OC\AllConfig->deleteUserValue("*** sensitive parameter replaced ***", "login_token", "*** sensitive parameter replaced ***")
3. /var/www/html/lib/base.php line 1043
   OC\User\Session->loginWithCookie("*** sensitive parameters replaced ***")
4. /var/www/html/lib/base.php line 983
   OC::handleLogin(OC\AppFramework\Http\Request {})
5. /var/www/html/index.php line 37
   OC::handleRequest()

GET /
from 172.18.0.7 at 2021-07-21T14:54:29+00:00

Editing to add my docker-compose.yml file:

version: '3'
services:

  nextcloud-db:
    image: mariadb:10.5
#    image: mariadb:10.6
    container_name: nextcloud-db
    hostname: nextcloud-db
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: unless-stopped
    env_file: .env
    volumes:
      - ./nextcloud-data-db:/var/lib/mysql

  nextcloud-redis:
    image: redis:5.0.9-alpine
    container_name: nextcloud-redis
    hostname: nextcloud-redis
    restart: unless-stopped

  nextcloud-app:
    image: nextcloud:21-fpm
    container_name: nextcloud-app
    hostname: nextcloud-app
    restart: unless-stopped
    env_file: .env
    depends_on:
      - nextcloud-db
      - nextcloud-redis
    volumes:
      - ./nextcloud-data/:/var/www/html
      - ./nextcloud.ini:/usr/local/etc/php/conf.d/nextcloud.ini

  nextcloud-web:
    image: nginx:alpine
    container_name: nextcloud-web
    hostname: nextcloud-web
    restart: unless-stopped
    volumes:
      - ./nextcloud-data/:/var/www/html:ro
      - ./nginx.conf:/etc/nginx/nginx.conf:ro

  nextcloud-cron:
    image: nextcloud:21-fpm
    container_name: nextcloud-cron
    hostname: nextcloud-cron
    restart: unless-stopped
    volumes:
      - ./nextcloud-data/:/var/www/html
    entrypoint: /cron.sh
    depends_on:
      - nextcloud-db
      - nextcloud-redis

networks:
  default:
    external:
      name: $DOCKER_MY_NETWORK

Hi @alzxjm1

Welcome to the forums. This topic has been discussed serval times here already…

https://help.nextcloud.com/search?q=mariadb%2010.6

Or maybe one of these threads is of any help…

https://help.nextcloud.com/t/internal-server-error-the-server-was-unable-to-complete-your-request-after-upgrading-docker-image/120216/16

https://help.nextcloud.com/t/new-setup-docker-compose-not-working/115673/9

And in general: There is no need to always upgrade to the latest MariaDB major versions immediately- At least if you don’t want to have such “early adaptor” problems. (same goes for PHP btw) Nextcloud itself always supports at least two to three older versions. And MariaDB itself offers five years support on every major version. Just sayin’ :wink: