Lost my transactional file locking: Check all steps [SOLVED]

Solved

Despite.

> root@diwan:/var/www/nextcloud# php8.1 -m | grep redis
null

apt-get install php8.1-redis
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following NEW packages will be installed:
php8.1-redis
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.


Restart apache and now work.,  

System upgrade to php8.2 and on php8.2 is php-redis, but not in php8.1 

============== OLD ========
Hi
Nextcloud version **[Nextcloud Hub 6](https://nextcloud.com/) (27.1.3)**
Operating system and version _(eg, Ubuntu 20.04)_: `20.04.6 LTS`
Apache or nginx version _(eg, Apache 2.4.25)_:  `Apache/2.4.41 (Ubunut)`
PHP version _(eg, 7.4)_: `PHP Version 8.1.25`

The issue you are facing:
* The database is used for transactional file locking. To enhance performance, please configure memcache, if available. See the [documentation ↗](https://docs.nextcloud.com/server/27/go.php?to=admin-transactional-locking) for more information.


Is this the first time you've seen this error? Yes. On 4 years is first time.

Steps to replicate it:

1. Update **[Nextcloud Hub 6](https://nextcloud.com/) (27.1.3)**. (But latest version has same problem)
2. After update check Security & Warnings
3. Show problem The database is used for transactional file locking. To enhance performance, please configure memcache, if available. See the [documentation ↗](https://docs.nextcloud.com/server/27/go.php?to=admin-transactional-locking) for more information.

The output of your Nextcloud log in **Admin > Logging**:

errors not show information about admin … only about issues with size …
Error no app in context Sabre\DAV\Exception\BadRequest: Expected filesize of 10000000 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side. noviembre 23, 2023 17:55:20
Error no app in context Sabre\DAV\Exception\BadRequest: Expected filesize of 2725360 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 98304 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side. noviembre 23, 2023 17:55:20
Error no app in context Sabre\DAV\Exception\BadRequest: Expected filesize of 2725360 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 65536 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side. noviembre 23, 2023 17:54:14



<?php $CONFIG = array ( 'instanceid' => 'ociz9efdik2y', 'passwordsalt' => '+G1Nibq4qhxGGSnVsdfsdfsdfsdfsdfs, 'secret' => 'gBAAkQ4SECRETETETETETETETETETETET', 'trusted_domains' => array ( 0 => 'diwan.mydomain.tld', ), 'datadirectory' => '/data', 'dbtype' => 'mysql', 'version' => '27.1.3.2', 'overwrite.cli.url' => 'https://diwan.mydomain.tld', 'dbname' => 'nextcloud', 'dbhost' => 'localhost', 'dbport' => '', 'dbtableprefix' => 'oc_', 'mysql.utf8mb4' => true, 'dbuser' => 'clouduser', 'dbpassword' => 'DFGDFGDFGDFGDFGDFGDFG', 'installed' => true, 'mail_smtpmode' => 'smtp', 'mail_smtpsecure' => 'tls', 'mail_sendmailmode' => 'smtp', 'mail_from_address' => 'sistemas', 'mail_domain' => 'castris.com', 'mail_smtpauthtype' => 'PLAIN', 'mail_smtpauth' => 1, 'mail_smtphost' => 'smtp.MYDOMAIN.TLD', 'mail_smtpport' => '587', 'mail_smtpname' => 'sistemas@MYDOMAIN.TLD', 'mail_smtppassword' => 'KKKKKKKKKKKKKKKK', 'memcache.local' => '\\OC\\Memcache\\APCu', 'filelocking.enabled' => true, 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => '/var/run/redis/redis-server.sock', 'port' => 0, 'password' => '', 'dbindex' => 0, ), 'activity_expire_days' => 90, 'default_phone_region' => 'ES', 'maintenance' => false, 'log_type' => 'file', 'logfile' => '/var/www/nextcloud.log', 'loglevel' => 3, 'logdateformat' => 'F d, Y H:i:s', 'theme' => '', 'trashbin_retention_obligation' => '1, auto', 'versions_retention_obligation' => '1, auto', 'updater.secret' => '$2y$10$KKKKKKKKKKKKKKKKKKKKWba', ); ``` The output of your Apache/nginx/system log in `/var/log/____`: Only mi ip after reload admin/overview ``` root@diwan:/var/www/nextcloud# tail -f /var/log/apache2/*.log | grep 81.32.0.133 diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:58:24 +0000] "GET /index.php/apps/logreader/poll?lastReqId=z4Xj6ECRoyAaja0oNhuM HTTP/1.1" 200 908 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:58:52 +0000] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 204 5329 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:58:44 +0000] "GET /index.php/apps/logreader/poll?lastReqId=z4Xj6ECRoyAaja0oNhuM HTTP/1.1" 200 2000 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:58:57 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 304 4835 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:05 +0000] "GET /index.php/settings/admin/overview HTTP/1.1" 200 20555 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "GET /index.php/apps/unsplash/api/dashboard.css HTTP/1.1" 200 1145 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "GET /ocs/v2.php/search/providers?from=%2Fsettings%2Fadmin%2Foverview HTTP/1.1" 200 1218 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "GET /ocs/v2.php/apps/user_status/api/v1/statuses/tamainut HTTP/1.1" 200 1007 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/1.1" 204 803 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "PROPFIND /.well-known/caldav HTTP/1.1" 301 5424 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "PROPFIND /remote.php/webdav HTTP/1.1" 207 20755 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "GET /.well-known/webfinger HTTP/1.1" 404 5459 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "GET /.well-known/nodeinfo HTTP/1.1" 404 5458 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "PROPFIND /.well-known/carddav HTTP/1.1" 301 898 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "GET /ocm-provider/ HTTP/1.1" 200 1080 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "GET /ocs-provider/ HTTP/1.1" 200 1781 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "GET /index.php/heartbeat HTTP/1.1" 200 948 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/1.1" 200 1630 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 207 1284 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "PROPFIND /remote.php/dav/ HTTP/1.1" 207 1284 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:07 +0000] "GET /ocs/v2.php/cloud/groups/details HTTP/1.1" 200 1065 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - tamainut [23/Nov/2023:16:59:07 +0000] "GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 304 4836 "-" "Mozilla/5.0 (Macintosh) mirall/3.10.1git (build 18409) (Nextcloud, osx-23.1.0 ClientArchitecture: arm64 OsArchitecture: arm64)" diwan.tamainut.net:443 81.32.0.133 - tamainut [23/Nov/2023:16:59:07 +0000] "GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 5573 "-" "Mozilla/5.0 (Macintosh) mirall/3.10.1git (build 18409) (Nextcloud, osx-23.1.0 ClientArchitecture: arm64 OsArchitecture: arm64)" diwan.tamainut.net:443 81.32.0.133 - tamainut [23/Nov/2023:16:59:07 +0000] "PROPFIND /remote.php/dav/files/tamainut/ HTTP/1.1" 207 5703 "-" "Mozilla/5.0 (Macintosh) mirall/3.10.1git (build 18409) (Nextcloud, osx-23.1.0 ClientArchitecture: arm64 OsArchitecture: arm64)" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:06 +0000] "GET /index.php/settings/ajax/checksetup HTTP/1.1" 200 2291 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" diwan.tamainut.net:443 81.32.0.133 - - [23/Nov/2023:16:59:08 +0000] "GET /index.php/apps/files/preview-service-worker.js HTTP/1.1" 200 6774 "https://diwan.tamainut.net/index.php/apps/files/preview-service-worker.js" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36" ``` Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary. ``` Nothing relevant for problem. ``` Other data ``` root@diwan:/var/www/nextcloud# ls -lisah /run/redis/redis-server.sock 745 0 srwxrwx--- 1 redis redis 0 Nov 23 16:29 /run/redis/redis-server.sock redis-cli -s /var/run/redis/redis-server.sock ping PONG apt-cache policy php-redis php-redis: Installed: 6.0.1-1+ubuntu20.04.1+deb.sury.org+1 Candidate: 6.0.1-1+ubuntu20.04.1+deb.sury.org+1 Version table: *** 6.0.1-1+ubuntu20.04.1+deb.sury.org+1 500 500 http://ppa.launchpad.net/ondrej/php/ubuntu focal/main amd64 Packages 100 /var/lib/dpkg/status 5.1.1+4.3.0-1 500 500 http://es.archive.ubuntu.com/ubuntu focal/universe amd64 Packages ps ax | grep memcached 859 ? Ssl 0:00 /usr/bin/memcached -m 512M -p 11211 -u memcache -l 127.0.0.1 -P /var/run/memcached/memcached.pid 3328 pts/0 R+ 0:00 grep --color=auto memcached ``` ![CastrisPHP 8.1.25 - phpinfo()1123174023|548x500](upload://7jRoWGJXLtcS6C2AAp0NokD1dVa.jpeg)