File is locked - how to unlock

I had to set up a new nextcloud and had the same error.

I don’t use redis but memcached.
I commented out the entry for memcached in
/var/www/nextcloud/config/config.php:

#‘memcache.local’ => ‘\OC\Memcache\APCu’,

Now the sync works properly