Filelocks aren't removed

Nextcloud version (eg, 20.0.5): 27.1.8
Operating system and version (eg, Ubuntu 20.04): webhosted
Apache or nginx version (eg, Apache 2.4.25): webhosted
PHP version (eg, 7.4): 8.3

The issue you are facing: The files are locked (even when not used) and the locked aren’t removed again automatically

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

Steps to replicate it:

  1. Nothing or
  2. Open File
  3. Perhaps it is coursed by the NextCloud Windows Client (latest version)

The output of your Nextcloud log in Admin > Logging:

Creation of dynamic property OCA\FilesLock\DAV\LockBackend::$server is deprecated at /www/htdocs/TOPSECRET/apps/files_lock/lib/DAV/LockBackend.php#57

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

PASTE HERE

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

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.

{"reqId":"Zhhfl_R49fs2hSXTC_Z7IAAAAJc","level":0,"time":"2024-04-11T22:09:27+00:00","remoteAddr":"95.223.39.107","user":"Ingo.H","app":"PHP","method":"PROPFIND","url":"/remote.php/dav/files/JustTheBest/","message":"Creation of dynamic property OCA\\FilesLock\\DAV\\LockBackend::$server is deprecated at /www/htdocs/TOPSECRET/apps/files_lock/lib/DAV/LockBackend.php#57","userAgent":"Mozilla/5.0 (Windows) mirall/3.12.3stable-Win64 (build 20240328) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"27.1.8.1","data":{"app":"PHP"}}

The locks are eventually removed automatically by cronjobs, if they don’t run properly, that can be an issue. If no redis cache is use for locking, it is handled by the database, and it can create such a huge load on the database, that it fails managing this properly.
You can remove the file locks manually from the database: File is locked - how to unlock

And shared hosting comes with limitations: How To: Get Help on Shared Webhosting

Thanks. I already did that manually. But it’s pretty awkward for a business instance

what do you mean, it is a hosted Nextcloud? Or a webhosting where you installed Nextcloud?