# Filelocks aren't removed

**URL:** <https://help.nextcloud.com/t/filelocks-arent-removed/187961>\
**Category:** ℹ️ Support\
**Tags:** desktop-client, windows, nc27\
**Created:** [April 11, 2024, 10:16pm UTC](https://help.nextcloud.com/t/filelocks-arent-removed/187961 "2024-04-11T22:16:08Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ushur](https://help.nextcloud.com/letter_avatar/ushur/32/6_22734026db12803ebb3e059622ac3534.png) [@Ushur](https://help.nextcloud.com/u/Ushur)\
**Post date:** [April 11, 2024, 10:16pm UTC](https://help.nextcloud.com/t/filelocks-arent-removed/187961/1 "2024-04-11T22:16:08Z")

</div>

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** :

```auto
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!):

```auto
PASTE HERE

```

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

```auto
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.

```auto
{"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"}}

```

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [April 12, 2024, 9:18am UTC](https://help.nextcloud.com/t/filelocks-arent-removed/187961/2 "2024-04-12T09:18:09Z")

</div>

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](https://help.nextcloud.com/t/file-is-locked-how-to-unlock/1883)

> [@Ushur](#):
>
> Operating system and version _(eg, Ubuntu 20.04)_: `webhosted`

And shared hosting comes with limitations: [How To: Get Help on Shared Webhosting](https://help.nextcloud.com/t/how-to-get-help-on-shared-webhosting/178243)

---

<div class="post-metadata">

**Author:** ![Ushur](https://help.nextcloud.com/letter_avatar/ushur/32/6_22734026db12803ebb3e059622ac3534.png) [@Ushur](https://help.nextcloud.com/u/Ushur)\
**Post date:** [April 12, 2024, 10:09am UTC](https://help.nextcloud.com/t/filelocks-arent-removed/187961/3 "2024-04-12T10:09:09Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tflidd](https://help.nextcloud.com/letter_avatar/tflidd/32/6_22734026db12803ebb3e059622ac3534.png) [@tflidd](https://help.nextcloud.com/u/tflidd)\
**Post date:** [April 15, 2024, 9:07am UTC](https://help.nextcloud.com/t/filelocks-arent-removed/187961/4 "2024-04-15T09:07:22Z")

</div>

> [@Ushur](#):
>
> 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?

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [January 16, 2025, 8:30am UTC](https://help.nextcloud.com/t/filelocks-arent-removed/187961/5 "2025-01-16T08:30:27Z")

</div>


