Nextcloud.log throws php errors after MySQL database recovery

Nextcloud version: 19.0.0
Operating system and version: Debian 10
Apache or nginx version: Apache 2.4.38
PHP version: 7.3.18

After uploading a lot of photos, my Nextloud 18 somehow lost its connection to the MySQL server. I was able to pull dumps, reinitialize MySQL, restore the database dump, did a

files:scan --all

as well as a

maintenance:repair

and afterwards the nextcloud worked again Phew!

I then upgraded successfully to Nextcloud 19 which worked fine so far. The first call of cron.php ran for about 8 hours, but all following cron.php calls are done in some seconds.

Now the problem:
At least at each log out of each user (I think much more often) the server throws the error

session_start(): A session had already been started - ignoring at /home/users/held/www/nc/lib/private/Session/Internal.php#209

with various additional content inside. I put some random raw entrys at the end. I’m afraid that this happens because something with my database is still broken, but

 mysqlcheck -p --auto-repair --check

says only OKs.

How can I check and repair the database? Or what can I do to find the problem?

The output of your config.php file:


<?php
$CONFIG = array (
  'instanceid' => 'REMOVED',
  'passwordsalt' => 'REMOVED,
  'secret' => 'REMOVED',
  'trusted_domains' =>
  array (
    0 => 'REMOVED',
    1 => 'REMOVED',
    2 => 'REMOVED',
    3 => 'REMOVED',
  ),
  'datadirectory' => 'REMOVED',
  'overwrite.cli.url' => 'REMOVED',
  'dbtype' => 'mysql',
  'version' => '19.0.0.12',
  'dbname' => 'REMOVED',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'REMOVED',
  'dbpassword' => 'REMOVED',
  'logtimezone' => 'Europe/Berlin',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'trashbin_retention_obligation' => '30,30',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'singleuser' => false,
  'mail_smtpmode' => 'smtp',
  'log_rotate_size' => '1048576',
  'mail_from_address' => 'nextcloud',
  'mail_domain' => 'REMOVED',
  'updater.release.channel' => 'stable',
  'mail_smtphost' => 'REMOVED',
  'mail_smtpport' => '25',
  'enable_previews' => true,
  'preview_max_x' => 2048,
  'preview_max_y' => 2048,
  'preview_max_scale_factor' => 2,
  'mail_smtpsecure' => 'tls',
  'mail_smtpauthtype' => 'LOGIN',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'REMOVED',
  'mail_smtppassword' => 'REMOVED',
  'skeletondirectory' => '',
  'mysql.utf8mb4' => true,
  'has_rebuilt_cache' => true,
  'app.mail.imap.timeout' => 180,
  'app.mail.smtp.timeout' => 30,
  'data-fingerprint' => 'REMOVED',
  ),
);

Some random raw messages:

{"reqId":"7AqCkzJ64bSG8lXy7xUA","level":3,"time":"2020-06-11T18:17:16+02:00","remoteAddr":"REMOVED","user":"--","app":"PHP","method":"REPORT","url":"/remote.php/dav/calendars/REMOVED","message":"session_start(): A session had already been started - ignoring at /REMOVED/nc/lib/private/Session/Internal.php#209","userAgent":"CalDavSynchronizer/3.8","version":"19.0.0.12","id":"5ee2590d3f39e"}

{"reqId":"SlXrBUSChGklmgQjxnGX","level":3,"time":"2020-06-11T18:11:23+02:00","remoteAddr":"REMOVED","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/addressbooks/REMOVED/","message":"session_start(): A session had already been started - ignoring at /REMOVED/nc/lib/private/Session/Internal.php#209","userAgent":"Thunderbird CalDAV/CardDAV Lightning/68.9.0","version":"19.0.0.12","id":"5ee257ac0655b"}

{"reqId":"yqiKmB571xeq0HFnGbLL","level":3,"time":"2020-06-11T17:49:07+02:00","remoteAddr":"REMOVED","user":"--","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/principals/REMOVED/","message":"session_start(): A session had already been started - ignoring at /REMOVED/nc/lib/private/Session/Internal.php#209","userAgent":"Thunderbird CalDAV/CardDAV Lightning/68.9.0","version":"19.0.0.12","id":"5ee252f7a09ed"}

{"reqId":"mMtu0bSYYNP8y23ZWyRb","level":3,"time":"2020-06-11T15:32:38+02:00","remoteAddr":"REMOVED","user":"--","app":"PHP","method":"GET","url":"/index.php/apps/notes/api/v0.2/notes?pruneBefore=1591621753","message":"session_start(): A session had already been started - ignoring at /REMOVED/nc/lib/private/Session/Internal.php#209","userAgent":"Mozilla/5.0 (Android) Nextcloud-android/3.11.1","version":"19.0.0.12","id":"5ee253f9493e0"}