[Bug]: SQL Deadlock on file renaming
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
Bug description
An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction
Steps to reproduce
Try to rename a file on Desktop, and wait for the Nextcloud Desktop Client to upload it. Often results in Deadlock (not always).
Expected behavior
File is renamed.
Installation method
None
Nextcloud Server version
28
Operating system
None
PHP engine version
PHP 8.2
Web server
Apache (supported)
Database engine version
MariaDB
Is this bug present after an update or on a fresh install?
None
Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
What user-backends are you using?
- Default user-backend (database)
- LDAP/ Active Directory
- SSO - SAML
- Other
Configuration report
No response
List of activated Apps
No response
Nextcloud Signing status
No response
Nextcloud Logs
{
"reqId": "FEO5bCkzSmzWg2mmky1m",
"level": 3,
"time": "2024-07-03T09:57:48+02:00",
"remoteAddr": "8.22.29.25",
"user": "user.name",
"app": "webdav",
"method": "MOVE",
"url": "/remote.php/dav/files/user.name/POLE%20ADMIN/FONDATION/2025/Trame%20de%20note%20de%20frais%20FCS-2024.xlsx",
"message": "An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction",
"userAgent": "Mozilla/5.0 (Windows) mirall/3.8.2stable-Win64 (build 20230516) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)",
"version": "28.0.7.4",
"exception": {
"Exception": "Doctrine\\DBAL\\Exception\\DeadlockException",
"Message": "An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction",
"Code": 1213,
"Trace": [
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1814,
"function": "convert",
"class": "Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
"type": "->",
"args": [
[
"Doctrine\\DBAL\\Driver\\PDO\\Exception"
],
[
"Doctrine\\DBAL\\Query"
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1749,
"function": "handleDriverException",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
[
"Doctrine\\DBAL\\Driver\\PDO\\Exception"
],
[
"Doctrine\\DBAL\\Query"
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1163,
"function": "convertExceptionDuringQuery",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
[
"Doctrine\\DBAL\\Driver\\PDO\\Exception"
],
"UPDATE `oc_filecache` SET `size` = ? WHERE (`fileid` = ?) AND ((`size` <> ?) OR (`size` IS NULL))",
[
165473361,
"*** sensitive parameters replaced ***",
165473361
],
[
2,
1,
2
]
]
},
{
"file": "/var/www/nextcloud/lib/private/DB/Connection.php",
"line": 298,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `size` = ? WHERE (`fileid` = ?) AND ((`size` <> ?) OR (`size` IS NULL))",
[
165473361,
"*** sensitive parameters replaced ***",
165473361
],
[
2,
1,
2
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
"line": 354,
"function": "executeStatement",
"class": "OC\\DB\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `size` = :dcValue3 WHERE (`fileid` = :dcValue1) AND ((`size` <> :dcValue2) OR (`size` IS NULL))",
[
"*** sensitive parameters replaced ***",
165473361,
165473361
],
[
1,
2,
2
]
]
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 280,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 387,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 1035,
"function": "update",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 953,
"function": "calculateFolderSizeInner",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025",
[
"OC\\Files\\Cache\\CacheEntry"
]
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/HomeCache.php",
"line": 43,
"function": "calculateFolderSize",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025",
null
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 905,
"function": "calculateFolderSize",
"class": "OC\\Files\\Cache\\HomeCache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025",
null
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 917,
"function": "correctFolderSize",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Updater.php",
"line": 223,
"function": "correctFolderSize",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 308,
"function": "renameFromStorage",
"class": "OC\\Files\\Cache\\Updater",
"type": "->",
"args": [
[
"OCA\\Files_Trashbin\\Storage",
null,
[
"OC\\Files\\Cache\\Scanner"
],
null,
null,
[
"OC\\Files\\Cache\\Updater"
]
],
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 824,
"function": "renameUpdate",
"class": "OC\\Files\\View",
"type": "->",
"args": [
[
"OCA\\Files_Trashbin\\Storage",
null,
[
"OC\\Files\\Cache\\Scanner"
],
null,
null,
[
"OC\\Files\\Cache\\Updater"
]
],
[
"OCA\\Files_Trashbin\\Storage",
null,
[
"OC\\Files\\Cache\\Scanner"
],
null,
null,
[
"OC\\Files\\Cache\\Updater"
]
],
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php",
"line": 159,
"function": "rename",
"class": "OC\\Files\\View",
"type": "->",
"args": [
"/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
"line": 153,
"function": "setName",
"class": "OCA\\DAV\\Connector\\Sabre\\Node",
"type": "->",
"args": [
"Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 612,
"function": "move",
"class": "Sabre\\DAV\\Tree",
"type": "->",
"args": [
"files/user.name/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"files/user.name/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpMove",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"method:MOVE",
[
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 253,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 321,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Server.php",
"line": 371,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/remote.php",
"line": 172,
"args": [
"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
"Line": 41,
"Previous": {
"Exception": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
"Message": "SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction",
"Code": 1213,
"Trace": [
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"line": 103,
"function": "new",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Exception",
"type": "::",
"args": [
[
"PDOException",
[
"40001",
1213,
"Deadlock found when trying to get lock; try restarting transaction"
]
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1153,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/DB/Connection.php",
"line": 298,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `size` = ? WHERE (`fileid` = ?) AND ((`size` <> ?) OR (`size` IS NULL))",
[
165473361,
"*** sensitive parameters replaced ***",
165473361
],
[
2,
1,
2
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
"line": 354,
"function": "executeStatement",
"class": "OC\\DB\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `size` = :dcValue3 WHERE (`fileid` = :dcValue1) AND ((`size` <> :dcValue2) OR (`size` IS NULL))",
[
"*** sensitive parameters replaced ***",
165473361,
165473361
],
[
1,
2,
2
]
]
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 280,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 387,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 1035,
"function": "update",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 953,
"function": "calculateFolderSizeInner",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025",
[
"OC\\Files\\Cache\\CacheEntry"
]
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/HomeCache.php",
"line": 43,
"function": "calculateFolderSize",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025",
null
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 905,
"function": "calculateFolderSize",
"class": "OC\\Files\\Cache\\HomeCache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025",
null
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 917,
"function": "correctFolderSize",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Updater.php",
"line": 223,
"function": "correctFolderSize",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 308,
"function": "renameFromStorage",
"class": "OC\\Files\\Cache\\Updater",
"type": "->",
"args": [
[
"OCA\\Files_Trashbin\\Storage",
null,
[
"OC\\Files\\Cache\\Scanner"
],
null,
null,
[
"OC\\Files\\Cache\\Updater"
]
],
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 824,
"function": "renameUpdate",
"class": "OC\\Files\\View",
"type": "->",
"args": [
[
"OCA\\Files_Trashbin\\Storage",
null,
[
"OC\\Files\\Cache\\Scanner"
],
null,
null,
[
"OC\\Files\\Cache\\Updater"
]
],
[
"OCA\\Files_Trashbin\\Storage",
null,
[
"OC\\Files\\Cache\\Scanner"
],
null,
null,
[
"OC\\Files\\Cache\\Updater"
]
],
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php",
"line": 159,
"function": "rename",
"class": "OC\\Files\\View",
"type": "->",
"args": [
"/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
"line": 153,
"function": "setName",
"class": "OCA\\DAV\\Connector\\Sabre\\Node",
"type": "->",
"args": [
"Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 612,
"function": "move",
"class": "Sabre\\DAV\\Tree",
"type": "->",
"args": [
"files/user.name/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"files/user.name/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpMove",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"method:MOVE",
[
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 253,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 321,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Server.php",
"line": 371,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/remote.php",
"line": 172,
"args": [
"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
"Line": 30,
"Previous": {
"Exception": "PDOException",
"Message": "SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction",
"Code": "40001",
"Trace": [
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"line": 101,
"function": "execute",
"class": "PDOStatement",
"type": "->",
"args": [
null
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
"line": 1153,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDO\\Statement",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/DB/Connection.php",
"line": 298,
"function": "executeStatement",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `size` = ? WHERE (`fileid` = ?) AND ((`size` <> ?) OR (`size` IS NULL))",
[
165473361,
"*** sensitive parameters replaced ***",
165473361
],
[
2,
1,
2
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
"line": 354,
"function": "executeStatement",
"class": "OC\\DB\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `size` = :dcValue3 WHERE (`fileid` = :dcValue1) AND ((`size` <> :dcValue2) OR (`size` IS NULL))",
[
"*** sensitive parameters replaced ***",
165473361,
165473361
],
[
1,
2,
2
]
]
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 280,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 387,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 1035,
"function": "update",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 953,
"function": "calculateFolderSizeInner",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025",
[
"OC\\Files\\Cache\\CacheEntry"
]
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/HomeCache.php",
"line": 43,
"function": "calculateFolderSize",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025",
null
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 905,
"function": "calculateFolderSize",
"class": "OC\\Files\\Cache\\HomeCache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025",
null
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
"line": 917,
"function": "correctFolderSize",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Updater.php",
"line": 223,
"function": "correctFolderSize",
"class": "OC\\Files\\Cache\\Cache",
"type": "->",
"args": [
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 308,
"function": "renameFromStorage",
"class": "OC\\Files\\Cache\\Updater",
"type": "->",
"args": [
[
"OCA\\Files_Trashbin\\Storage",
null,
[
"OC\\Files\\Cache\\Scanner"
],
null,
null,
[
"OC\\Files\\Cache\\Updater"
]
],
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 824,
"function": "renameUpdate",
"class": "OC\\Files\\View",
"type": "->",
"args": [
[
"OCA\\Files_Trashbin\\Storage",
null,
[
"OC\\Files\\Cache\\Scanner"
],
null,
null,
[
"OC\\Files\\Cache\\Updater"
]
],
[
"OCA\\Files_Trashbin\\Storage",
null,
[
"OC\\Files\\Cache\\Scanner"
],
null,
null,
[
"OC\\Files\\Cache\\Updater"
]
],
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"files/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php",
"line": 159,
"function": "rename",
"class": "OC\\Files\\View",
"type": "->",
"args": [
"/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
"line": 153,
"function": "setName",
"class": "OCA\\DAV\\Connector\\Sabre\\Node",
"type": "->",
"args": [
"Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 612,
"function": "move",
"class": "Sabre\\DAV\\Tree",
"type": "->",
"args": [
"files/user.name/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2024.xlsx",
"files/user.name/POLE ADMIN/FONDATION/2025/Trame de note de frais FCS-2025.xlsx"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpMove",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 472,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"method:MOVE",
[
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 253,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
[
"Sabre\\HTTP\\Request"
],
[
"Sabre\\HTTP\\Response"
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 321,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Server.php",
"line": 371,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/remote.php",
"line": 172,
"args": [
"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
"Line": 101
}
},
"message": "An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction",
"exception": [],
"CustomMessage": "An exception occurred while executing a query: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction"
},
"id": "6685080b4497d"
}
Additional info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with lib/private/Files/Cache/Cache.php at the update and folder-size calculation frames, then follow lib/private/Files/Cache/Updater.php around renameFromStorage and the MariaDB UPDATE shown in the trace. Reproduce a Desktop Client rename followed by upload and inspect the WebDAV MOVE path. Done means the rename completes without the reported deadlock.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mariadb, php
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100