Server crash signing "internal server error", log indicates fail to connect Database

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 18.0.2): 19.0.1.1
Operating system and version (eg, Ubuntu 20.04): Debian 10
Apache or nginx version (eg, Apache 2.4.25): Nginx
PHP version (eg, 7.1):

The issue you are facing: I opened up my nextcloud server today and find that the server has crashed.

Is this the first time you’ve seen this error? (Y/N): N, I have encountered it once, and solved via reinstallation, but this time the files and configuration are valuable, so I want to recover it.

Steps to replicate it: I don’t know the cause, the server worked just fine and now it crashed

The output of your Nextcloud log in Admin > Logging:

{"reqId":"rZjwvAgrkEEjvWGa62tG","level":3,"time":"2020-09-01T07:34:56+00:00","remoteAddr":"60.194.241.132","user":"--","app":"core","method":"GET","url":"/remote.php/dav/avatars/Tangdi/128.png","message":{"Exception":"Doctrine\\DBAL\\DBALException","Message":"Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":889,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/DB/Connection.php","line":194,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM `oc_appconfig`",[],[],null]},{"file":"/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":200,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->","args":["SELECT * FROM `oc_appconfig`",[],[]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":216,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":331,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":109,"function":"loadConfigValues","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":287,"function":"getApps","class":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":883,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"installed_version"]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":164,"function":"getAppVersions","class":"OC_App","type":"::","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":185,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["error",""]},{"file":"/var/www/html/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_Template.php","line":334,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":87,"function":"printExceptionErrorPage","class":"OC_Template","type":"::","args":[{"__class__":"Doctrine\\DBAL\\DBALException"},500]},{"file":"/var/www/html/remote.php","line":169,"function":"handleException","args":[{"__class__":"Doctrine\\DBAL\\DBALException"}]}],"File":"/var/www/html/lib/private/DB/Connection.php","Line":67,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Windows) mirall/2.6.5stable-Win64 (build 20200710) (Nextcloud)","version":"19.0.1.1"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'instanceid' => 'xxx',
  'passwordsalt' => xxxx
  'secret' => xxxx
  'trusted_domains' => 
  array (
    0 => 'cloud.ixxxxxcx.ink',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '19.0.1.1',
  'overwrite.cli.url' => 'https://cloud.ixiexie.ink',
  'dbname' => 'nextcloud',
  'dbhost' => 'mariadb',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'xxxx',
  'installed' => true,
  'maintenance' => false,
);

I fear some more information is needed to help you here. How did you install Nextcloud? Manually? Could you provide the logs from your webserver?

(A wild guess would be either the MySQL server has stopped (restart it) or your PHP MySQL package is missing (install it and restart php).

OK, so the nextcloud and mariadb are all deployed with docker. I’ve checked the mariadb container and the container is fine, there are some detail in the log maybe helpful. This is a clip of the mariadb log. It seems indicating the server has sent the wrong request.

2020-08-26 00:23:20+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2020-08-26 00:23:21+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-08-26 00:23:21+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2020-08-26  0:23:22 0 [Note] mysqld (mysqld 10.5.4-MariaDB-1:10.5.4+maria~focal) starting as process 1 ...
2020-08-26  0:23:22 0 [Note] InnoDB: Using Linux native AIO
2020-08-26  0:23:22 0 [Note] InnoDB: Uses event mutexes
2020-08-26  0:23:22 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-08-26  0:23:22 0 [Note] InnoDB: Number of pools: 1
2020-08-26  0:23:22 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
2020-08-26  0:23:22 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2020-08-26  0:23:22 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2020-08-26  0:23:22 0 [Note] InnoDB: Completed initialization of buffer pool
2020-08-26  0:23:22 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-08-26  0:23:22 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=874632563
2020-08-26  0:23:22 0 [Note] InnoDB: 128 rollback segments are active.
2020-08-26  0:23:22 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-08-26  0:23:22 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-08-26  0:23:22 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-08-26  0:23:22 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-08-26  0:23:22 0 [Note] InnoDB: 10.5.4 started; log sequence number 874632575; transaction id 629275
2020-08-26  0:23:22 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-08-26  0:23:22 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-08-26  0:23:23 0 [Note] InnoDB: Buffer pool(s) load completed at 200826  0:23:23
2020-08-26  0:23:23 0 [Note] Server socket created on IP: '::'.
2020-08-26  0:23:23 0 [Warning] 'proxies_priv' entry '@% root@fb16a0d8ee88' ignored in --skip-name-resolve mode.
2020-08-26  0:23:23 0 [Note] Reading of all Master_info entries succeeded
2020-08-26  0:23:23 0 [Note] Added new Master_info '' to hash table
2020-08-26  0:23:23 0 [Note] mysqld: ready for connections.
Version: '10.5.4-MariaDB-1:10.5.4+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
2020-08-26 10:26:54 9817 [Warning] Aborted connection 9817 to db: 'nextcloud' user: 'nextcloud' host: '172.21.0.3' (Got an error reading communication packets)
2020-08-26 13:35:15 10658 [Warning] Aborted connection 10658 to db: 'nextcloud' user: 'nextcloud' host: '172.21.0.3' (Got an error reading communication packets)
2020-08-27 17:37:02 25474 [Warning] Aborted connection 25474 to db: 'nextcloud' user: 'nextcloud' host: '172.21.0.3' (Got an error reading communication packets)
2020-08-27 21:37:42 25497 [Warning] Aborted connection 25497 to db: 'nextcloud' user: 'nextcloud' host: '172.21.0.3' (Got an error reading communication packets)
2020-08-27 22:32:55 25510 [Warning] Aborted connection 25510 to db: 'nextcloud' user: 'nextcloud' host: '172.21.0.3' (Got an error reading communication packets)
2020-08-28  7:49:26 26124 [Warning] Aborted connection 26124 to db: 'nextcloud' user: 'nextcloud' host: '172.21.0.3' (Got an error reading communication packets)
2020-08-28 14:09:20+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2020-08-28 14:09:21+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-08-28 14:09:21+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2020-08-28 14:09:22 0 [Note] mysqld (mysqld 10.5.4-MariaDB-1:10.5.4+maria~focal) starting as process 1 ...
2020-08-28 14:09:22 0 [Note] InnoDB: Using Linux native AIO
2020-08-28 14:09:22 0 [Note] InnoDB: Uses event mutexes
2020-08-28 14:09:22 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-08-28 14:09:22 0 [Note] InnoDB: Number of pools: 1
2020-08-28 14:09:22 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
2020-08-28 14:09:22 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2020-08-28 14:09:22 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2020-08-28 14:09:22 0 [Note] InnoDB: Completed initialization of buffer pool
2020-08-28 14:09:22 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-08-28 14:09:22 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=980781167
2020-08-28 14:09:22 0 [Note] InnoDB: 128 rollback segments are active.
2020-08-28 14:09:22 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-08-28 14:09:22 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-08-28 14:09:22 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-08-28 14:09:22 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-08-28 14:09:22 0 [Note] InnoDB: 10.5.4 started; log sequence number 980781179; transaction id 710107
2020-08-28 14:09:22 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-08-28 14:09:22 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-08-28 14:09:22 0 [Note] Server socket created on IP: '::'.
2020-08-28 14:09:22 0 [Note] InnoDB: Buffer pool(s) load completed at 200828 14:09:22
2020-08-28 14:09:22 0 [Warning] 'proxies_priv' entry '@% root@fb16a0d8ee88' ignored in --skip-name-resolve mode.
2020-08-28 14:09:22 0 [Note] Reading of all Master_info entries succeeded
2020-08-28 14:09:22 0 [Note] Added new Master_info '' to hash table
2020-08-28 14:09:22 0 [Note] mysqld: ready for connections.
Version: '10.5.4-MariaDB-1:10.5.4+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
2020-08-29 05:37:43+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2020-08-29 05:37:44+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-08-29 05:37:44+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2020-08-29  5:37:45 0 [Note] mysqld (mysqld 10.5.4-MariaDB-1:10.5.4+maria~focal) starting as process 1 ...
2020-08-29  5:37:45 0 [Note] InnoDB: Using Linux native AIO
2020-08-29  5:37:45 0 [Note] InnoDB: Uses event mutexes
2020-08-29  5:37:45 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-08-29  5:37:45 0 [Note] InnoDB: Number of pools: 1
2020-08-29  5:37:45 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
2020-08-29  5:37:45 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2020-08-29  5:37:45 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2020-08-29  5:37:45 0 [Note] InnoDB: Completed initialization of buffer pool
2020-08-29  5:37:45 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-08-29  5:37:45 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=992270468
2020-08-29  5:37:45 0 [Note] InnoDB: 128 rollback segments are active.
2020-08-29  5:37:45 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-08-29  5:37:45 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-08-29  5:37:45 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-08-29  5:37:45 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-08-29  5:37:45 0 [Note] InnoDB: 10.5.4 started; log sequence number 992270480; transaction id 716886
2020-08-29  5:37:45 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-08-29  5:37:45 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-08-29  5:37:45 0 [Note] InnoDB: Buffer pool(s) load completed at 200829  5:37:45
2020-08-29  5:37:45 0 [Note] Server socket created on IP: '::'.
2020-08-29  5:37:45 0 [Warning] 'proxies_priv' entry '@% root@fb16a0d8ee88' ignored in --skip-name-resolve mode.
2020-08-29  5:37:45 0 [Note] Reading of all Master_info entries succeeded
2020-08-29  5:37:45 0 [Note] Added new Master_info '' to hash table
2020-08-29  5:37:45 0 [Note] mysqld: ready for connections.
Version: '10.5.4-MariaDB-1:10.5.4+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
2020-08-30 04:06:07+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2020-08-30 04:06:08+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-08-30 04:06:08+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2020-08-30  4:06:09 0 [Note] mysqld (mysqld 10.5.4-MariaDB-1:10.5.4+maria~focal) starting as process 1 ...
2020-08-30  4:06:09 0 [Note] InnoDB: Using Linux native AIO
2020-08-30  4:06:09 0 [Note] InnoDB: Uses event mutexes
2020-08-30  4:06:09 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-08-30  4:06:09 0 [Note] InnoDB: Number of pools: 1
2020-08-30  4:06:09 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
2020-08-30  4:06:09 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2020-08-30  4:06:09 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2020-08-30  4:06:09 0 [Note] InnoDB: Completed initialization of buffer pool
2020-08-30  4:06:09 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2020-08-30  4:06:09 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1018810385
2020-08-30  4:06:09 0 [Note] InnoDB: 128 rollback segments are active.
2020-08-30  4:06:09 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-08-30  4:06:09 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-08-30  4:06:09 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-08-30  4:06:09 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-08-30  4:06:09 0 [Note] InnoDB: 10.5.4 started; log sequence number 1018810465; transaction id 731496
2020-08-30  4:06:09 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-08-30  4:06:09 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-08-30  4:06:09 0 [Note] Server socket created on IP: '::'.
2020-08-30  4:06:09 0 [Note] InnoDB: Buffer pool(s) load completed at 200830  4:06:09
2020-08-30  4:06:09 0 [Warning] 'proxies_priv' entry '@% root@fb16a0d8ee88' ignored in --skip-name-resolve mode.
2020-08-30  4:06:09 0 [Note] Reading of all Master_info entries succeeded
2020-08-30  4:06:09 0 [Note] Added new Master_info '' to hash table
2020-08-30  4:06:09 0 [Note] mysqld: ready for connections.
Version: '10.5.4-MariaDB-1:10.5.4+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
2020-08-30 14:48:17 6254 [Warning] Aborted connection 6254 to db: 'nextcloud' user: 'nextcloud' host: '172.21.0.3' (Got an error reading communication packets)
2020-08-31 11:51:33 9432 [Warning] Aborted connection 9432 to db: 'nextcloud' user: 'nextcloud' host: '172.21.0.3' (Got an error reading communication packets)

I’m getting the same error from my docker container:
docker-compose.yml
version: “3.7”
########################### NETWORKS
networks:
t2_proxy:
external:
name: t2_proxy
default:
driver: bridge

########################### SERVICES
services:
# All services / apps go below this line
  db:
    image: mariadb
    container_name: nextcloud_db
    volumes:
      - db:/var/lib/mysql
    networks:
      - t2_proxy
    environment:
      - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
      - MYSQL_PASSWORD=nextcloud
    restart: always

  redis:
    image: redis:6.0
    container_name: nextcloud_redis
    environment: 
      - TZ=${TZ}  
    restart: always
  
  nextcloud:
    image: nextcloud
    container_name: nextcloud
    depends_on:
      - db
      - redis
    ports: 
      - "9089:80"
      - "9088:443"
    volumes:
      - ${PWD}/config:/var/www/html/config
      - ${PWD}/data:/var/www/html/data
      - ${PWD}/custom_apps:/var/www/html/custom_apps/
      - ${PWD}/themes:/var/www/html/themes
#      - /mnt/:/mnt/
    environment:
      - TZ=${TZ}
      - PUID=${PUID}
      - PGID=${PGID}
    restart: always
    networks: 
      - t2_proxy 
    labels:
      traefik.enable: "true"
      traefik.http.routers.nc-sec.rule: Host(`nc.${DOMAINNAME}`)
      traefik.http.routers.nc-sec.entrypoints: web, websecure
      traefik.http.routers.nc-sec.tls: "true"
      traefik.http.routers.nc-sec.tls.certresolver: le
      traefik.http.services.nc-sec.loadbalancer.server.port: 80

volumes:
  db:

This is from the error log:

{"reqId":"T90tzJ8rahgnqp6D2Hwz","level":3,"time":"2020-09-26T05:16:18+00:00","remoteAddr":"100.68.5.191","user":"--","app":"core","method":"GET","url":"/sett
        ings/user/sync-clients","message":{"Exception":"Doctrine\\DBAL\\DBALException","Message":"Failed to connect to the database: An exception occurred in driver:
        SQLSTATE[HY000] [1045] Access denied for user 'nextcloud'@'192.168.48.6' (using password: YES)","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/d
        bal/lib/Doctrine/DBAL/Connection.php","line":889,"function":"connect","class":"OC\\DB\\Connection","type":"->","args":[]},{"file":"/var/www/html/lib/private/
        DB/Connection.php","line":194,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->","args":["SELECT * FROM `oc_appconfig`",[],[],null]},
        {"file":"/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":200,"function":"executeQuery","class":"OC\\DB\\Connection","ty
        pe":"->","args":["SELECT * FROM `oc_appconfig`",[],[]]},{"file":"/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php","line":216,"function":"execute",
        "class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":331,"function":"execute","class
        ":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":109,"function":"loadConfigValues","cla
        ss":"OC\\AppConfig","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppConfig.php","line":287,"function":"getApps","class":"OC\\AppConfig","type":"
        ->","args":[]},{"file":"/var/www/html/lib/private/legacy/OC_App.php","line":883,"function":"getValues","class":"OC\\AppConfig","type":"->","args":[false,"ins
        talled_version"]},{"file":"/var/www/html/lib/private/TemplateLayout.php","line":164,"function":"getAppVersions","class":"OC_App","type":"::","args":[]},{"fil
        e":"/var/www/html/lib/private/legacy/OC_Template.php","line":185,"function":"__construct","class":"OC\\TemplateLayout","type":"->","args":["error",""]},{"fil
        e":"/var/www/html/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->","args":[]},{"file":"/var/www/html/lib/pr
        ivate/legacy/OC_Template.php","line":334,"function":"printPage","class":"OC\\Template\\Base","type":"->","args":[]},{"file":"/var/www/html/index.php","line":
        63,"function":"printExceptionErrorPage","class":"OC_Template","type":"::","args":[{"__class__":"Doctrine\\DBAL\\DBALException"},500]}],"File":"/var/www/html/
        lib/private/DB/Connection.php","Line":67,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (X11; Linux x86_64; rv:81.0) Gecko/20100101 Firefox/81.0","version":"
        19.0.0.12"}

And this is nextcloud_db i.e. mariadb

Version: '10.5.4-MariaDB-1:10.5.4+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution
2020-09-22 18:18:06+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2020-09-22 18:18:37+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2020-09-22 18:18:38+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 1:10.5.4+maria~focal started.
2020-09-22 18:18:39 0 [Note] mysqld (mysqld 10.5.4-MariaDB-1:10.5.4+maria~focal) starting as process 1 ...
2020-09-22 18:18:39 0 [Note] InnoDB: Using Linux native AIO
2020-09-22 18:18:39 0 [Note] InnoDB: Uses event mutexes
2020-09-22 18:18:39 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2020-09-22 18:18:39 0 [Note] InnoDB: Number of pools: 1
2020-09-22 18:18:39 0 [Note] InnoDB: Using SSE4.2 crc32 instructions
2020-09-22 18:18:39 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
2020-09-22 18:18:39 0 [Note] InnoDB: Initializing buffer pool, total size = 134217728, chunk size = 134217728
2020-09-22 18:18:39 0 [Note] InnoDB: Completed initialization of buffer pool
2020-09-22 18:18:39 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority
().
2020-09-22 18:18:40 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1267029336
2020-09-22 18:18:41 0 [Note] InnoDB: 128 rollback segments are active.
2020-09-22 18:18:41 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2020-09-22 18:18:41 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2020-09-22 18:18:41 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2020-09-22 18:18:41 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2020-09-22 18:18:41 0 [Note] InnoDB: 10.5.4 started; log sequence number 1267029348; transaction id 899019
2020-09-22 18:18:41 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2020-09-22 18:18:41 0 [Note] Plugin 'FEEDBACK' is disabled.
2020-09-22 18:18:41 0 [Note] Server socket created on IP: '::'.
2020-09-22 18:18:41 0 [Note] InnoDB: Buffer pool(s) load completed at 200922 18:18:41
2020-09-22 18:18:42 0 [Warning] 'proxies_priv' entry '@% root@12812fdb7134' ignored in --skip-name-resolve mode.
2020-09-22 18:18:42 0 [Note] Reading of all Master_info entries succeeded
2020-09-22 18:18:42 0 [Note] Added new Master_info '' to hash table
2020-09-22 18:18:42 0 [Note] mysqld: ready for connections.
Version: '10.5.4-MariaDB-1:10.5.4+maria~focal'  socket: '/run/mysqld/mysqld.sock'  port: 3306  mariadb.org binary distribution

I think I’m facing the same kind of issue.

Have you been able to fix it ?
If so, how did you proceed ?