Can't upload files anymore // Infinite Distributed cache initiated

Nextcloud version (eg, 12.0.2): 16
Operating system and version (eg, Ubuntu 17.04): Debian 9
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.25
PHP version (eg, 7.1):

PHP 7.3.6-1+0~20190531112735.39+stretch~1.gbp6131b7 (cli) (built: May 31 2019 11:27:35)

The issue you are facing:

I tried to upload some files, the display for the upload was not normal for some reason.
It was flickering and i got an error message: Deadlock found when trying to get lock.

I moved over to github https://github.com/owncloud/core/issues/20555 and tried to
solve the problem by just running:

SET GLOBAL TRANSACTION ISOLATION LEVEL READ COMMITTED;
SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;

But this made it even worse.
Now i have the problem, that i can’t upload any files because i don’t have permission.
When i set the LogLevel to 0, user_sql is spamming

Distributed Cache initiated.

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

Steps to replicate it:

  1. ?

The output of your Nextcloud log in Admin > Logging:

|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:10+0200|
|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:10+0200|
|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:10+0200|
|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:10+0200|
|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:10+0200|
|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:09+0200|
|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:09+0200|
|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:09+0200|
|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:09+0200|
|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:08+0200|
|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:08+0200|
|Debug|user_sql|Distributed cache initiated.||2019-07-09T12:22:08+0200|

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

<?php $CONFIG = array ( 'instanceid' => '', 'passwordsalt' => '', 'secret' => '', 'trusted_domains' => array ( 0 => '', 1 => '', 2 => '', 3 => '', ), 'datadirectory' => '/var/nextcloud/data', 'dbtype' => 'mysql', 'version' => '16.0.2.1', 'csrf.disabled' => false, 'overwrite.cli.url' => 'https://Domain/nextcloud', 'dbname' => 'database', 'dbhost' => 'localhost', 'dbport' => '3306', 'dbtableprefix' => 'oc_', 'dbuser' => 'user', 'dbpassword' => 'passwort', 'installed' => true, 'maintenance' => false, 'theme' => '', 'loglevel' => 0, 'memcache.local' => '\\OC\\Memcache\\APCu', 'memcache.distributed' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => '/var/run/redis/redis.sock', 'port' => 0, 'dbindex' => 0, 'password' => 'passwort', 'timeout' => 1.5, ), 'cache_path' => '/var/nextcloud/data/usercache', 'mail_domain' => 'Domain', 'mail_from_address' => 'info', 'mail_smtpmode' => 'smtp', 'mail_sendmailmode' => 'smtp', 'mail_smtpauth' => 1, 'mail_smtpport' => '25', 'mail_smtphost' => '127.0.0.1', 'mail_smtpname' => 'info', 'mail_smtppassword' => 'passwort', 'mail_smtpauthtype' => 'PLAIN', 'mysql.utf8mb4' => true, 'ldapIgnoreNamingRules' => false, 'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory', 'app_install_overwrite' => array ( 0 => 'spreed', ), 'updater.secret' => 'Secret', );

Solved with Server Backup restore…