OS: Debian 9
Nextcloud Version: 15(0.7)
PHP Version: 7.2 (fpm)
Database: Postgresql 9.6
Webserver: Apache
Single-User system
not known
fpm and postgres logs getting spammed with these entries:
fpm_nextcloud.log:
PHP Fatal error: Uncaught PDOException: SQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected
DETAIL: Process 14896 waits for ShareLock on transaction 1930337; blocked by process 14897.
Process 14897 waits for ShareLock on transaction 1930336; blocked by process 14896.
HINT: See server log for query details.
CONTEXT: while rechecking updated tuple (12,138) in relation "oc_file_locks" in /opt/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105
Stack trace:
#0 /opt/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(105): PDOStatement->execute(NULL)
#1 /opt/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1006): Doctrine\DBAL\Driver\PDOStatement->execute()
#2 /opt/nextcloud/lib/private/DB/Connection.php(216): Doctrine\DBAL\Connection->executeUpdate('UPDATE "oc_file...', Array, Array)
#3 /opt/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php(208): OC\DB\Connection->executeUpdate('UPDATE "oc_file...', Array, Array)
#4 /opt/next in /opt/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php on line 92
postgresql-9.6-main.log:
2019-04-11 05:15:18 GMT ERROR: duplicate key value violates unique constraint "lock_key_index"
2019-04-11 05:15:18 GMT DETAIL: Key (key)=(files/7d79c31537be24aadcda7fa480987df4) already exists.
2019-04-11 05:15:18 GMT STATEMENT: INSERT INTO "oc_file_locks" ("key", "lock", "ttl") VALUES($1, $2, $3)
2019-04-11 05:15:18 GMT ERROR: duplicate key value violates unique constraint "lock_key_index"
2019-04-11 05:15:18 GMT DETAIL: Key (key)=(files/abfe242a994b591cb4dee19585031873) already exists.
2019-04-11 05:15:18 GMT STATEMENT: INSERT INTO "oc_file_locks" ("key", "lock", "ttl") VALUES($1, $2, $3)
I have a similar deadlock occurring (using nextcloud 16.0.3). It happens when uploading a file over webdav. Nginx returns a 423 http status code. At the postgres level a lot is happening; it basically starts with multiple:
ERROR: duplicate key value violates unique constraint "oc_credentials_pkey"
DETAIL: Key ("user", identifier)=(jknockaert, password::logincredentials/credentials) already exists.
STATEMENT: INSERT INTO "oc_credentials" ("user", "identifier", "credentials") VALUES($1, $2, $3)
and then deadlocks get detected, like this one:
ERROR: deadlock detected
DETAIL: Process 13718 waits for ShareLock on transaction 17507889; blocked by process 13720.
HINT: See server log for query details.
CONTEXT: while rechecking updated tuple (0,91) in relation "oc_file_locks"
STATEMENT: UPDATE "oc_file_locks" SET "lock" = "lock" - '1' WHERE ("key" IN ($1, $2, $3, $4)) AND ("lock" > 0)
As the client keeps reiterating it's http put request, after a short while the postgres server hits its maximum number of connections:
FATAL: remaining connection slots are reserved for non-replication superuser connections
FATAL: sorry, too many clients already
which is pretty ridiculous, provided this is a single nextcloud user setup (with a max of 200 connections on the postgres backend).
This is the full nextcloud log:
Doctrine\DBAL\Exception\DeadlockException: An exception occurred while executing 'UPDATE "oc_file_locks" SET "lock" = "lock" + 1, "ttl" = ? WHERE "key" = ? AND "lock" >= 0' with params [1564417365, "files\/e7e0bbf21169ed1673f5ddf8ed7ebb89"]:
SQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected
DETAIL: Process 13976 waits for ExclusiveLock on tuple (6,56) of relation 16847 of database 16389; blocked by process 13956.
Process 13956 waits for ShareLock on transaction 17508673; blocked by process 13908.
Process 13908 waits for ShareLock on transaction 17508707; blocked by process 13910.
Process 13910 waits for ExclusiveLock on tuple (6,56) of relation 16847 of database 16389; blocked by process 13976.
HINT: See server log for query details.
0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 184:
Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException("An exceptio ... .", Doctrine\DBA ... ]})
1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 158:
Doctrine\DBAL\DBALException::wrapException(Doctrine\DBA ... {}, Doctrine\DBA ... ]}, "An exceptio ... .")
2. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 1088:
Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBA ... {}, Doctrine\DBA ... ]}, "UPDATE \"oc ... 0", { 1: 1564417 ... "})
3. /var/www/nextcloud/lib/private/DB/Connection.php - line 216:
Doctrine\DBAL\Connection->executeUpdate("UPDATE \"oc ... 0", [ 1564417365 ... "], [])
4. /var/www/nextcloud/lib/private/Lock/DBLockingProvider.php - line 189:
OC\DB\Connection->executeUpdate("UPDATE \"oc ... 0", [ 1564417365 ... "])
5. /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 715:
OC\Lock\DBLockingProvider->acquireLock("files/e7e0b ... 9", 1)
6. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593:
OC\Files\Storage\Common->acquireLock("files/Backups", 1, OC\Lock\DBLockingProvider {})
7. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593:
OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Backups", 1, OC\Lock\DBLockingProvider {})
8. /var/www/nextcloud/lib/private/Files/View.php - line 1940:
OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Backups", 1, OC\Lock\DBLockingProvider {})
9. /var/www/nextcloud/lib/private/Files/View.php - line 2054:
OC\Files\View->lockPath("/Backups", 1)
10. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php - line 378:
OC\Files\View->lockFile("/Backups/Si ... p", 1)
11. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 153:
OCA\DAV\Connector\Sabre\Node->acquireLock(1)
12. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096:
OCA\DAV\Connector\Sabre\Directory->createFile("signal-2019 ... p", null)
13. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525:
Sabre\DAV\Server->createFile("files/jknoc ... p", null, null)
14. <<closure>>
Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})
15. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:
call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])
16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:
Sabre\Event\EventEmitter->emit("method:PUT", [ Sabre\HTTP ... }])
17. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:
Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})
18. /var/www/nextcloud/apps/dav/lib/Server.php - line 316:
Sabre\DAV\Server->exec()
19. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:
OCA\DAV\Server->exec()
20. /var/www/nextcloud/remote.php - line 163:
require_once("/var/www/ne ... p")
Cased by Doctrine\DBAL\Driver\PDOException:
SQLSTATE[40P01]: Deadlock detected: 7
ERROR: deadlock detected
DETAIL: Process 13976 waits for ExclusiveLock on tuple (6,56) of relation 16847 of database 16389; blocked by process 13956.
Process 13956 waits for ShareLock on transaction 17508673; blocked by process 13908.
Process 13908 waits for ShareLock on transaction 17508707; blocked by process 13910.
Process 13910 waits for ExclusiveLock on tuple (6,56) of relation 16847 of database 16389; blocked by process 13976.
HINT: See server log for query details.
0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 1081:
Doctrine\DBAL\Driver\PDOStatement->execute([ 1564417365 ... "])
1. /var/www/nextcloud/lib/private/DB/Connection.php - line 216:
Doctrine\DBAL\Connection->executeUpdate("UPDATE \"oc ... 0", [ 1564417365 ... "], [])
2. /var/www/nextcloud/lib/private/Lock/DBLockingProvider.php - line 189:
OC\DB\Connection->executeUpdate("UPDATE \"oc ... 0", [ 1564417365 ... "])
3. /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 715:
OC\Lock\DBLockingProvider->acquireLock("files/e7e0b ... 9", 1)
4. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593:
OC\Files\Storage\Common->acquireLock("files/Backups", 1, OC\Lock\DBLockingProvider {})
5. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593:
OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Backups", 1, OC\Lock\DBLockingProvider {})
6. /var/www/nextcloud/lib/private/Files/View.php - line 1940:
OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Backups", 1, OC\Lock\DBLockingProvider {})
7. /var/www/nextcloud/lib/private/Files/View.php - line 2054:
OC\Files\View->lockPath("/Backups", 1)
8. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php - line 378:
OC\Files\View->lockFile("/Backups/Si ... p", 1)
9. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 153:
OCA\DAV\Connector\Sabre\Node->acquireLock(1)
10. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096:
OCA\DAV\Connector\Sabre\Directory->createFile("signal-2019 ... p", null)
11. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525:
Sabre\DAV\Server->createFile("files/jknoc ... p", null, null)
12. <<closure>>
Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})
13. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:
call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])
14. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:
Sabre\Event\EventEmitter->emit("method:PUT", [ Sabre\HTTP ... }])
15. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:
Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})
16. /var/www/nextcloud/apps/dav/lib/Server.php - line 316:
Sabre\DAV\Server->exec()
17. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:
OCA\DAV\Server->exec()
18. /var/www/nextcloud/remote.php - line 163:
require_once("/var/www/ne ... p")
Cased by PDOException:
SQLSTATE[40P01]: Deadlock detected: 7
ERROR: deadlock detected
DETAIL: Process 13976 waits for ExclusiveLock on tuple (6,56) of relation 16847 of database 16389; blocked by process 13956.
Process 13956 waits for ShareLock on transaction 17508673; blocked by process 13908.
Process 13908 waits for ShareLock on transaction 17508707; blocked by process 13910.
Process 13910 waits for ExclusiveLock on tuple (6,56) of relation 16847 of database 16389; blocked by process 13976.
HINT: See server log for query details.
0. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php - line 141:
PDOStatement->execute([ 1564417365 ... "])
1. /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 1081:
Doctrine\DBAL\Driver\PDOStatement->execute([ 1564417365 ... "])
2. /var/www/nextcloud/lib/private/DB/Connection.php - line 216:
Doctrine\DBAL\Connection->executeUpdate("UPDATE \"oc ... 0", [ 1564417365 ... "], [])
3. /var/www/nextcloud/lib/private/Lock/DBLockingProvider.php - line 189:
OC\DB\Connection->executeUpdate("UPDATE \"oc ... 0", [ 1564417365 ... "])
4. /var/www/nextcloud/lib/private/Files/Storage/Common.php - line 715:
OC\Lock\DBLockingProvider->acquireLock("files/e7e0b ... 9", 1)
5. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593:
OC\Files\Storage\Common->acquireLock("files/Backups", 1, OC\Lock\DBLockingProvider {})
6. /var/www/nextcloud/lib/private/Files/Storage/Wrapper/Wrapper.php - line 593:
OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Backups", 1, OC\Lock\DBLockingProvider {})
7. /var/www/nextcloud/lib/private/Files/View.php - line 1940:
OC\Files\Storage\Wrapper\Wrapper->acquireLock("files/Backups", 1, OC\Lock\DBLockingProvider {})
8. /var/www/nextcloud/lib/private/Files/View.php - line 2054:
OC\Files\View->lockPath("/Backups", 1)
9. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php - line 378:
OC\Files\View->lockFile("/Backups/Si ... p", 1)
10. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 153:
OCA\DAV\Connector\Sabre\Node->acquireLock(1)
11. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096:
OCA\DAV\Connector\Sabre\Directory->createFile("signal-2019 ... p", null)
12. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525:
Sabre\DAV\Server->createFile("files/jknoc ... p", null, null)
13. <<closure>>
Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})
14. /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105:
call_user_func_array([ Sabre\DAV\ ... "], [ Sabre\HTTP ... }])
15. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479:
Sabre\Event\EventEmitter->emit("method:PUT", [ Sabre\HTTP ... }])
16. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254:
Sabre\DAV\Server->invokeMethod(Sabre\HTTP\R ... "}, Sabre\HTTP\Response {})
17. /var/www/nextcloud/apps/dav/lib/Server.php - line 316:
Sabre\DAV\Server->exec()
18. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 35:
OCA\DAV\Server->exec()
19. /var/www/nextcloud/remote.php - line 163:
require_once("/var/www/ne ... p")
Likely I was seeing #11136.
@mfr00t @jknockaert would you mind to edit your post and add the issue template?
To reproduce such issues its required to setup a similar environment (webserver, active apps, configuration, etc.). A workaround for you could be to disable filelocking or use redis as locking provider.
STATEMENT: UPDATE "oc_file_locks" SET "lock" = "lock" - '1' WHERE ("key" IN ($1, $2, $3, $4)) AND ("lock" > 0)
The query looks related to the cleanup logs logic. This is tricky because the action / task is done and the final step is to delete our locks (on files in nextcloud) and run into a deadlock while trying to change the db values (because the db entry related to the file lock is locked by another process).
Index: lib/private/Lock/DBLockingProvider.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- lib/private/Lock/DBLockingProvider.php (revision 7b8ddd7e958bfbf7dbddf38aca2c789310e3d1a4)
+++ lib/private/Lock/DBLockingProvider.php (date 1565639171793)
@@ -301,14 +301,12 @@
return $this->sharedLocks[$path];
});
- $chunkedPaths = array_chunk($lockedPaths, 100);
-
- foreach ($chunkedPaths as $chunk) {
- $builder = $this->connection->getQueryBuilder();
+ $builder = $this->connection->getQueryBuilder();
+ foreach($lockedPaths as $lockedPath) {
$query = $builder->update('file_locks')
->set('lock', $builder->func()->subtract('lock', $builder->expr()->literal(1)))
- ->where($builder->expr()->in('key', $builder->createNamedParameter($chunk, IQueryBuilder::PARAM_STR_ARRAY)))
+ ->where($builder->expr()->eq('key', $builder->createNamedParameter($lockedPath, IQueryBuilder::PARAM_STR)))
->andWhere($builder->expr()->gt('lock', new Literal(0)));
$query->execute();
Could you try the above patch? I wonder if the unlocking would be more stable (but slower in situations with many locked files) when updating each lock for itself instead of changing multiple locks with one update.
@kesselb I already moved to using Redis and am having the issue (which likely was #11136) far less often now. There's still something happening when I opened a folder with many thousands of files, but I am not sure if that was really a bug or (more likely) resources being oversollicited.
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions.
Hey @mfr00t :ping_pong:
Got some deadlocks:
OS: Debian
Database: postgres 11.5-1+deb10u1
Nextloud: 16.0.3
Client (Linux): Version 2.5.1git.
Steps to reproduce on my server
The number of deadlocks varies from time to time, but some are there.
I am having the same issue on a 16.0.6 instance running with official docker image and PostgreSQL and Redis for file locking.
Here is the template for my case:
Upload of files should work fine.
Some files are not uploaded and we need to retry the synchro
Operating system: Official docker image (alpine)
Web server: Nginx
Database: PostgreSQL
PHP version: official docker image (alpine)
Nextcloud version: 16.0.6
Updated from an older Nextcloud/ownCloud or fresh install: updated from previous docker images
Where did you install Nextcloud from: docker image
Signing status:
Signing status
No errors have been found.
List of activated apps:
App list
Enabled:
- accessibility: 1.2.0
- activity: 2.9.1
- admin_audit: 1.6.0
- bruteforcesettings: 1.4.0
- calendar: 1.7.1
- cloud_federation_api: 0.2.0
- comments: 1.6.0
- contacts: 3.1.6
- dav: 1.9.2
- deck: 0.6.6
- encryption: 2.4.0
- federatedfilesharing: 1.6.0
- federation: 1.6.0
- files: 1.11.0
- files_external: 1.7.0
- files_markdown: 2.1.0
- files_pdfviewer: 1.5.0
- files_rightclick: 0.15.1
- files_sharing: 1.8.0
- files_texteditor: 2.8.0
- files_trashbin: 1.6.0
- files_versions: 1.9.0
- files_videoplayer: 1.5.0
- firstrunwizard: 2.5.0
- gallery: 18.3.0
- gpxpod: 4.1.0
- keeweb: 0.5.1
- logreader: 2.1.0
- lookup_server_connector: 1.4.0
- mail: 0.17.0
- maps: 0.1.2
- nextcloud_announcements: 1.5.0
- notes: 3.1.1
- notifications: 2.4.1
- oauth2: 1.4.2
- password_policy: 1.6.0
- privacy: 1.0.0
- provisioning_api: 1.6.0
- recommendations: 0.4.0
- serverinfo: 1.6.0
- sharebymail: 1.6.0
- spreed: 6.0.4
- support: 1.0.0
- survey_client: 1.4.0
- systemtags: 1.6.0
- text: 1.0.2
- theming: 1.7.0
- twofactor_backupcodes: 1.5.0
- twofactor_totp: 3.0.1
- updatenotification: 1.6.0
- viewer: 1.2.0
- workflowengine: 1.6.0
Disabled:
- user_ldap
Nextcloud configuration:
Config report
{
"system": {
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"cloud.<***mydomain***>.org",
"cloud.<***myotherdomain***>.org"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "pgsql",
"version": "16.0.6.1",
"overwrite.cli.url": "https:\/\/cloud.<***mydomain***>.org",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "***REMOVED SENSITIVE VALUE***",
"overwriteprotocol": "https",
"default_language": "fr",
"default_locale": "fr_FR",
"skeletondirectory": "",
"mail_smtpmode": "smtp",
"mail_smtpsecure": "tls",
"mail_sendmailmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"updater.release.channel": "production",
"maintenance": false,
"data-fingerprint": "b8e80239835e6594661b708acac6fd93",
"loglevel": 2,
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379
}
}
}
Are you using external storage, if yes which one: Openstack (but not involved in the scenario)
Are you using encryption: yes (only for external storage)
Are you using an external user-backend, if yes which one: No
Browser: Linux Nextcloud client
Operating system: Ubuntu
Nextcloud client log
17:13:53||<*** filepath1 ***>|INST_NEW|Up|1518876379|e51b52f8bd500559327907cdea198185|19553|00036609ocnql6ltneii|4||201|0|0||||
||<*** filepath2 ***>|INST_NEW|Up|1518876343||19722||2|Le serveur a r茅pondu "500 Internal Server Error" 脿 "PUT https://cloud.<*** mydomain **>.org/remote.php/dav/files/<***user***>/<***filepath2***>" (An exception occurred while executing 'UPDATE "oc_filecache" SET "size" = "size" + ? WHERE ("storage" = ?) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'a5e79d08a2537d0a20ca80cb69cf5510', 'bcdabe23da3d4129a7c0bbd8995a1d4f', '61fd82a3669a0ab4b5f9d9742820ac75', '78b4d9143292956a9a75e7984514c875', '0d050e68cb0381f9268eac96c381cf72', '0fcba6c9a0d39d778fea05e800d6a175', '6fa12ebc0b561bbd57c1fc175c385d38', 'c393b52313d2ef9957c44db078089771', 'c67b8f536d2a56199130c4fdc17f750e')) AND ("size" > '-1')' with params [19722, 3]:
SQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected
DETAIL: Process 28687 waits for ShareLock on transaction 2542049; blocked by process 28683.
Process 28683 waits for ShareLock on transaction 2542042; blocked by process 28687.
HINT: See server log for query details.
CONTEXT: while rechecking updated tuple (1136,55) in relation "oc_filecache")|500|0|0||||
Web server error log
<***local docker IP adress***> - <***user***> [05/Jan/2020:17:13:53 +0000] "PUT /remote.php/dav/files/<***user***>/<***filepath1***> HTTP/1.1" 201 0 "-" "Mozilla/5.0 (Linux) mirall/2.6.2git (Nextcloud)" "<***IP Address removed***>"
<***local docker IP adress***> - <***user***> [05/Jan/2020:17:13:54 +0000] "PUT /remote.php/dav/files/<***user***>/<***filepath2***> HTTP/1.1" 500 1150 "-" "Mozilla/5.0 (Linux) mirall/2.6.2git (Nextcloud)" "<***IP address removed***>"
Nextcloud log
{
"reqId": "ztJF3cRHVKVDATHxxYx3",
"level": 4,
"time": "2020-01-05T17:13:54+00:00",
"remoteAddr": "<***removed***>",
"user": "<***user***>",
"app": "webdav",
"method": "PUT",
"url": "/remote.php/dav/files/<***user***>/<***filepath2***>",
"message": {
"Exception": "Doctrine\\DBAL\\Exception\\DeadlockException",
"Message": "An exception occurred while executing 'UPDATE \"oc_filecache\" SET \"size\" = \"size\" + ? WHERE (\"storage\" = ?) AND (\"path_hash\" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'a5e79d08a2537d0a20ca80cb69cf5510', 'bcdabe23da3d4129a7c0bbd8995a1d4f', '61fd82a3669a0ab4b5f9d9742820ac75', '78b4d9143292956a9a75e7984514c875', '0d050e68cb0381f9268eac96c381cf72', '0fcba6c9a0d39d778fea05e800d6a175', '6fa12ebc0b561bbd57c1fc175c385d38', 'c393b52313d2ef9957c44db078089771', 'c67b8f536d2a56199130c4fdc17f750e')) AND (\"size\" > '-1')' with params [19722, 3]:\n\nSQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected\nDETAIL: Process 28687 waits for ShareLock on transaction 2542049; blocked by process 28683.\nProcess 28683 waits for ShareLock on transaction 2542042; blocked by process 28687.\nHINT: See server log for query details.\nCONTEXT: while rechecking updated tuple (1136,55) in relation \"oc_filecache\"",
"Code": 0,
"Trace": [
{
"file": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php",
"line": 184,
"function": "convertException",
"class": "Doctrine\\DBAL\\Driver\\AbstractPostgreSQLDriver",
"type": "->",
"args": [
"An exception occurred while executing 'UPDATE \"oc_filecache\" SET \"size\" = \"size\" + ? WHERE (\"storage\" = ?) AND (\"path_hash\" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'a5e79d08a2537d0a20ca80cb69cf5510', 'bcdabe23da3d4129a7c0bbd8995a1d4f', '61fd82a3669a0ab4b5f9d9742820ac75', '78b4d9143292956a9a75e7984514c875', '0d050e68cb0381f9268eac96c381cf72', '0fcba6c9a0d39d778fea05e800d6a175', '6fa12ebc0b561bbd57c1fc175c385d38', 'c393b52313d2ef9957c44db078089771', 'c67b8f536d2a56199130c4fdc17f750e')) AND (\"size\" > '-1')' with params [19722, 3]:\n\nSQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected\nDETAIL: Process 28687 waits for ShareLock on transaction 2542049; blocked by process 28683.\nProcess 28683 waits for ShareLock on transaction 2542042; blocked by process 28687.\nHINT: See server log for query details.\nCONTEXT: while rechecking updated tuple (1136,55) in relation \"oc_filecache\"",
{
"errorInfo": [
"40P01",
7,
"ERROR: deadlock detected\nDETAIL: Process 28687 waits for ShareLock on transaction 2542049; blocked by process 28683.\nProcess 28683 waits for ShareLock on transaction 2542042; blocked by process 28687.\nHINT: See server log for query details.\nCONTEXT: while rechecking updated tuple (1136,55) in relation \"oc_filecache\""
],
"__class__": "Doctrine\\DBAL\\Driver\\PDOException"
}
]
},
{
"file": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php",
"line": 158,
"function": "wrapException",
"class": "Doctrine\\DBAL\\DBALException",
"type": "::",
"args": [
{
"__class__": "Doctrine\\DBAL\\Driver\\PDOPgSql\\Driver"
},
{
"errorInfo": [
"40P01",
7,
"ERROR: deadlock detected\nDETAIL: Process 28687 waits for ShareLock on transaction 2542049; blocked by process 28683.\nProcess 28683 waits for ShareLock on transaction 2542042; blocked by process 28687.\nHINT: See server log for query details.\nCONTEXT: while rechecking updated tuple (1136,55) in relation \"oc_filecache\""
],
"__class__": "Doctrine\\DBAL\\Driver\\PDOException"
},
"An exception occurred while executing 'UPDATE \"oc_filecache\" SET \"size\" = \"size\" + ? WHERE (\"storage\" = ?) AND (\"path_hash\" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'a5e79d08a2537d0a20ca80cb69cf5510', 'bcdabe23da3d4129a7c0bbd8995a1d4f', '61fd82a3669a0ab4b5f9d9742820ac75', '78b4d9143292956a9a75e7984514c875', '0d050e68cb0381f9268eac96c381cf72', '0fcba6c9a0d39d778fea05e800d6a175', '6fa12ebc0b561bbd57c1fc175c385d38', 'c393b52313d2ef9957c44db078089771', 'c67b8f536d2a56199130c4fdc17f750e')) AND (\"size\" > '-1')' with params [19722, 3]:\n\nSQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected\nDETAIL: Process 28687 waits for ShareLock on transaction 2542049; blocked by process 28683.\nProcess 28683 waits for ShareLock on transaction 2542042; blocked by process 28687.\nHINT: See server log for query details.\nCONTEXT: while rechecking updated tuple (1136,55) in relation \"oc_filecache\""
]
},
{
"file": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php",
"line": 1088,
"function": "driverExceptionDuringQuery",
"class": "Doctrine\\DBAL\\DBALException",
"type": "::",
"args": [
{
"__class__": "Doctrine\\DBAL\\Driver\\PDOPgSql\\Driver"
},
{
"errorInfo": [
"40P01",
7,
"ERROR: deadlock detected\nDETAIL: Process 28687 waits for ShareLock on transaction 2542049; blocked by process 28683.\nProcess 28683 waits for ShareLock on transaction 2542042; blocked by process 28687.\nHINT: See server log for query details.\nCONTEXT: while rechecking updated tuple (1136,55) in relation \"oc_filecache\""
],
"__class__": "Doctrine\\DBAL\\Driver\\PDOException"
},
"UPDATE \"oc_filecache\" SET \"size\" = \"size\" + ? WHERE (\"storage\" = ?) AND (\"path_hash\" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'a5e79d08a2537d0a20ca80cb69cf5510', 'bcdabe23da3d4129a7c0bbd8995a1d4f', '61fd82a3669a0ab4b5f9d9742820ac75', '78b4d9143292956a9a75e7984514c875', '0d050e68cb0381f9268eac96c381cf72', '0fcba6c9a0d39d778fea05e800d6a175', '6fa12ebc0b561bbd57c1fc175c385d38', 'c393b52313d2ef9957c44db078089771', 'c67b8f536d2a56199130c4fdc17f750e')) AND (\"size\" > '-1')",
{
"1": 19722,
"2": 3
}
]
},
{
"file": "/var/www/html/lib/private/DB/Connection.php",
"line": 216,
"function": "executeUpdate",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
"UPDATE \"oc_filecache\" SET \"size\" = \"size\" + ? WHERE (\"storage\" = ?) AND (\"path_hash\" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'a5e79d08a2537d0a20ca80cb69cf5510', 'bcdabe23da3d4129a7c0bbd8995a1d4f', '61fd82a3669a0ab4b5f9d9742820ac75', '78b4d9143292956a9a75e7984514c875', '0d050e68cb0381f9268eac96c381cf72', '0fcba6c9a0d39d778fea05e800d6a175', '6fa12ebc0b561bbd57c1fc175c385d38', 'c393b52313d2ef9957c44db078089771', 'c67b8f536d2a56199130c4fdc17f750e')) AND (\"size\" > '-1')",
[
19722,
3
],
[
2,
1
]
]
},
{
"file": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php",
"line": 222,
"function": "executeUpdate",
"class": "OC\\DB\\Connection",
"type": "->",
"args": [
"UPDATE \"oc_filecache\" SET \"size\" = \"size\" + :dcValue1 WHERE (\"storage\" = :dcValue2) AND (\"path_hash\" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'a5e79d08a2537d0a20ca80cb69cf5510', 'bcdabe23da3d4129a7c0bbd8995a1d4f', '61fd82a3669a0ab4b5f9d9742820ac75', '78b4d9143292956a9a75e7984514c875', '0d050e68cb0381f9268eac96c381cf72', '0fcba6c9a0d39d778fea05e800d6a175', '6fa12ebc0b561bbd57c1fc175c385d38', 'c393b52313d2ef9957c44db078089771', 'c67b8f536d2a56199130c4fdc17f750e')) AND (\"size\" > '-1')",
{
"dcValue1": 19722,
"dcValue2": 3
},
{
"dcValue1": 2,
"dcValue2": 1
}
]
},
{
"file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 214,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/html/lib/private/Files/Cache/Propagator.php",
"line": 110,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/html/lib/private/Files/Cache/HomePropagator.php",
"line": 49,
"function": "propagateChange",
"class": "OC\\Files\\Cache\\Propagator",
"type": "->",
"args": [
"*** sensitive parameter replaced ***",
1578244430,
19722
]
},
{
"file": "/var/www/html/lib/private/Files/Cache/Updater.php",
"line": 138,
"function": "propagateChange",
"class": "OC\\Files\\Cache\\HomePropagator",
"type": "->",
"args": [
"*** sensitive parameter replaced ***",
1578244430,
19722
]
},
{
"file": "/var/www/html/apps/dav/lib/Connector/Sabre/File.php",
"line": 278,
"function": "update",
"class": "OC\\Files\\Cache\\Updater",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
"line": 156,
"function": "put",
"class": "OCA\\DAV\\Connector\\Sabre\\File",
"type": "->",
"args": [
null
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1096,
"function": "createFile",
"class": "OCA\\DAV\\Connector\\Sabre\\Directory",
"type": "->",
"args": [
"mini bataille navale Version3.0.py",
null
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 525,
"function": "createFile",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"files/<***user***>/<***filepath2***>",
null,
null
]
},
{
"function": "httpPut",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php",
"line": 105,
"function": "call_user_func_array",
"args": [
[
{
"__class__": "Sabre\\DAV\\CorePlugin"
},
"httpPut"
],
[
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 479,
"function": "emit",
"class": "Sabre\\Event\\EventEmitter",
"type": "->",
"args": [
"method:PUT",
[
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 254,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/html/apps/dav/lib/Server.php",
"line": 316,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/remote.php",
"line": 163,
"args": [
"/var/www/html/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php",
"Line": 55,
"Previous": {
"Exception": "Doctrine\\DBAL\\Driver\\PDOException",
"Message": "SQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected\nDETAIL: Process 28687 waits for ShareLock on transaction 2542049; blocked by process 28683.\nProcess 28683 waits for ShareLock on transaction 2542042; blocked by process 28687.\nHINT: See server log for query details.\nCONTEXT: while rechecking updated tuple (1136,55) in relation \"oc_filecache\"",
"Code": "40P01",
"Trace": [
{
"file": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php",
"line": 1079,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDOStatement",
"type": "->",
"args": []
},
{
"file": "/var/www/html/lib/private/DB/Connection.php",
"line": 216,
"function": "executeUpdate",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
"UPDATE \"oc_filecache\" SET \"size\" = \"size\" + ? WHERE (\"storage\" = ?) AND (\"path_hash\" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'a5e79d08a2537d0a20ca80cb69cf5510', 'bcdabe23da3d4129a7c0bbd8995a1d4f', '61fd82a3669a0ab4b5f9d9742820ac75', '78b4d9143292956a9a75e7984514c875', '0d050e68cb0381f9268eac96c381cf72', '0fcba6c9a0d39d778fea05e800d6a175', '6fa12ebc0b561bbd57c1fc175c385d38', 'c393b52313d2ef9957c44db078089771', 'c67b8f536d2a56199130c4fdc17f750e')) AND (\"size\" > '-1')",
[
19722,
3
],
[
2,
1
]
]
},
{
"file": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php",
"line": 222,
"function": "executeUpdate",
"class": "OC\\DB\\Connection",
"type": "->",
"args": [
"UPDATE \"oc_filecache\" SET \"size\" = \"size\" + :dcValue1 WHERE (\"storage\" = :dcValue2) AND (\"path_hash\" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'a5e79d08a2537d0a20ca80cb69cf5510', 'bcdabe23da3d4129a7c0bbd8995a1d4f', '61fd82a3669a0ab4b5f9d9742820ac75', '78b4d9143292956a9a75e7984514c875', '0d050e68cb0381f9268eac96c381cf72', '0fcba6c9a0d39d778fea05e800d6a175', '6fa12ebc0b561bbd57c1fc175c385d38', 'c393b52313d2ef9957c44db078089771', 'c67b8f536d2a56199130c4fdc17f750e')) AND (\"size\" > '-1')",
{
"dcValue1": 19722,
"dcValue2": 3
},
{
"dcValue1": 2,
"dcValue2": 1
}
]
},
{
"file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 214,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/html/lib/private/Files/Cache/Propagator.php",
"line": 110,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/html/lib/private/Files/Cache/HomePropagator.php",
"line": 49,
"function": "propagateChange",
"class": "OC\\Files\\Cache\\Propagator",
"type": "->",
"args": [
"*** sensitive parameter replaced ***",
1578244430,
19722
]
},
{
"file": "/var/www/html/lib/private/Files/Cache/Updater.php",
"line": 138,
"function": "propagateChange",
"class": "OC\\Files\\Cache\\HomePropagator",
"type": "->",
"args": [
"*** sensitive parameter replaced ***",
1578244430,
19722
]
},
{
"file": "/var/www/html/apps/dav/lib/Connector/Sabre/File.php",
"line": 278,
"function": "update",
"class": "OC\\Files\\Cache\\Updater",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
"line": 156,
"function": "put",
"class": "OCA\\DAV\\Connector\\Sabre\\File",
"type": "->",
"args": [
null
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1096,
"function": "createFile",
"class": "OCA\\DAV\\Connector\\Sabre\\Directory",
"type": "->",
"args": [
"mini bataille navale Version3.0.py",
null
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 525,
"function": "createFile",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"files/<***user***>/<***filepath2***>",
null,
null
]
},
{
"function": "httpPut",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php",
"line": 105,
"function": "call_user_func_array",
"args": [
[
{
"__class__": "Sabre\\DAV\\CorePlugin"
},
"httpPut"
],
[
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 479,
"function": "emit",
"class": "Sabre\\Event\\EventEmitter",
"type": "->",
"args": [
"method:PUT",
[
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 254,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/html/apps/dav/lib/Server.php",
"line": 316,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/remote.php",
"line": 163,
"args": [
"/var/www/html/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php",
"Line": 143,
"Previous": {
"Exception": "PDOException",
"Message": "SQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected\nDETAIL: Process 28687 waits for ShareLock on transaction 2542049; blocked by process 28683.\nProcess 28683 waits for ShareLock on transaction 2542042; blocked by process 28687.\nHINT: See server log for query details.\nCONTEXT: while rechecking updated tuple (1136,55) in relation \"oc_filecache\"",
"Code": "40P01",
"Trace": [
{
"file": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php",
"line": 141,
"function": "execute",
"class": "PDOStatement",
"type": "->",
"args": [
null
]
},
{
"file": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php",
"line": 1079,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDOStatement",
"type": "->",
"args": []
},
{
"file": "/var/www/html/lib/private/DB/Connection.php",
"line": 216,
"function": "executeUpdate",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
"UPDATE \"oc_filecache\" SET \"size\" = \"size\" + ? WHERE (\"storage\" = ?) AND (\"path_hash\" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'a5e79d08a2537d0a20ca80cb69cf5510', 'bcdabe23da3d4129a7c0bbd8995a1d4f', '61fd82a3669a0ab4b5f9d9742820ac75', '78b4d9143292956a9a75e7984514c875', '0d050e68cb0381f9268eac96c381cf72', '0fcba6c9a0d39d778fea05e800d6a175', '6fa12ebc0b561bbd57c1fc175c385d38', 'c393b52313d2ef9957c44db078089771', 'c67b8f536d2a56199130c4fdc17f750e')) AND (\"size\" > '-1')",
[
19722,
3
],
[
2,
1
]
]
},
{
"file": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php",
"line": 222,
"function": "executeUpdate",
"class": "OC\\DB\\Connection",
"type": "->",
"args": [
"UPDATE \"oc_filecache\" SET \"size\" = \"size\" + :dcValue1 WHERE (\"storage\" = :dcValue2) AND (\"path_hash\" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'a5e79d08a2537d0a20ca80cb69cf5510', 'bcdabe23da3d4129a7c0bbd8995a1d4f', '61fd82a3669a0ab4b5f9d9742820ac75', '78b4d9143292956a9a75e7984514c875', '0d050e68cb0381f9268eac96c381cf72', '0fcba6c9a0d39d778fea05e800d6a175', '6fa12ebc0b561bbd57c1fc175c385d38', 'c393b52313d2ef9957c44db078089771', 'c67b8f536d2a56199130c4fdc17f750e')) AND (\"size\" > '-1')",
{
"dcValue1": 19722,
"dcValue2": 3
},
{
"dcValue1": 2,
"dcValue2": 1
}
]
},
{
"file": "/var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 214,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/html/lib/private/Files/Cache/Propagator.php",
"line": 110,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/html/lib/private/Files/Cache/HomePropagator.php",
"line": 49,
"function": "propagateChange",
"class": "OC\\Files\\Cache\\Propagator",
"type": "->",
"args": [
"*** sensitive parameter replaced ***",
1578244430,
19722
]
},
{
"file": "/var/www/html/lib/private/Files/Cache/Updater.php",
"line": 138,
"function": "propagateChange",
"class": "OC\\Files\\Cache\\HomePropagator",
"type": "->",
"args": [
"*** sensitive parameter replaced ***",
1578244430,
19722
]
},
{
"file": "/var/www/html/apps/dav/lib/Connector/Sabre/File.php",
"line": 278,
"function": "update",
"class": "OC\\Files\\Cache\\Updater",
"type": "->",
"args": [
"*** sensitive parameters replaced ***"
]
},
{
"file": "/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php",
"line": 156,
"function": "put",
"class": "OCA\\DAV\\Connector\\Sabre\\File",
"type": "->",
"args": [
null
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 1096,
"function": "createFile",
"class": "OCA\\DAV\\Connector\\Sabre\\Directory",
"type": "->",
"args": [
"mini bataille navale Version3.0.py",
null
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 525,
"function": "createFile",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"files/<***user***>/<***filepath2***>",
null,
null
]
},
{
"function": "httpPut",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/html/3rdparty/sabre/event/lib/EventEmitterTrait.php",
"line": 105,
"function": "call_user_func_array",
"args": [
[
{
"__class__": "Sabre\\DAV\\CorePlugin"
},
"httpPut"
],
[
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 479,
"function": "emit",
"class": "Sabre\\Event\\EventEmitter",
"type": "->",
"args": [
"method:PUT",
[
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 254,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"absoluteUrl": "http://cloud.<**mydomain**>.org/remote.php/dav/files/<***user***>/<***filepath2***>",
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/html/apps/dav/lib/Server.php",
"line": 316,
"function": "exec",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/apps/dav/appinfo/v2/remote.php",
"line": 35,
"function": "exec",
"class": "OCA\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/html/remote.php",
"line": 163,
"args": [
"/var/www/html/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php",
"Line": 141
}
},
"CustomMessage": "--"
},
"userAgent": "Mozilla/5.0 (Linux) mirall/2.6.2git (Nextcloud)",
"version": "16.0.6.1"
}
Browser log
cf. Nextcloud client logs above
+1 here ... same error on a fresh install of Nextcloud 18 on FreeBSD 12.1, php 7.3.16 and PostgreSQL 12 + memcache and redis, one user. Hardware of the Server: 4-core Xeon with 32GB RAM and 2x2TB enterprise-hdd. Tried to sync 5GB (3900 pictures) and got loads of deadlocks.
I tried to avoid using mysql/mariadb, but in the end I did not have a choice. Just exchanging for a mariadb server made the errors vanish.
+1, tons of:
An exception occurred while executing 'UPDATE "oc_filecache" SET "size" = GREATEST(?, "size" + ?) WHERE ("storage" = ?) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', '5128f35c9b4be13788ba41bdb6d1fc1f', 'c54b5adfea9e869da3d8332a2675e327')) AND ("size" > '-1')' with params [-1, 10485760, 1]: SQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected DETAIL: Process 33850 waits for ShareLock on transaction 1591326; blocked by process 35133. Process 35133 waits for ShareLock on transaction 1591323; blocked by process 33850. HINT: See server log for query details. CONTEXT: while locking tuple (61,19) in relation "oc_filecache"
this is with 18.0.3 on FreeBSD 12.1 / PostgreSQL 11.6
any news on this...? Nextcloud is simply unusable with PostgreSQL due to those deadlocks ...
Since upgrade from 19.0.1 to 19.0.2 today, i'm having this problem too, each time i delete some files in a folder.
50 files deleted, 10 returns the error.
Filelocking is enabled on Redis. I'm using MariaBD 10.4.
{
"reqId": "1IyGszyr4rk3uCA4FIoF",
"level": 4,
"time": "2020-08-27T16:06:11+02:00",
"remoteAddr": "176.177.105.226",
"user": "nextcloud",
"app": "webdav",
"method": "DELETE",
"url": "/remote.php/dav/files/nextcloud/Photos/hvkjbhvbkljmknbm.png",
"message": {
"Exception": "Doctrine\\DBAL\\Exception\\DeadlockException",
"Message": "An exception occurred while executing 'UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, ?), `etag` = ? WHERE (`storage` = ?) AND (`path_hash` IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'd01bb67e7b71dd49fd06bad922f521c9'))' with params [1598537171, \"5f47bdd345199\", 1]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction",
"Code": 0,
"Trace": [
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php",
"line": 169,
"function": "convertException",
"class": "Doctrine\\DBAL\\Driver\\AbstractMySQLDriver",
"type": "->",
"args": [
"An exception occurred while executing 'UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, ?), `etag` = ? WHERE (`storage` = ?) AND (`path_hash` IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'd01bb67e7b71dd49fd06bad922f521c9'))' with params [1598537171, \"5f47bdd345199\", 1]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction",
{
"errorInfo": [
"40001",
1213,
"Deadlock found when trying to get lock; try restarting transaction"
],
"__class__": "Doctrine\\DBAL\\Driver\\PDOException"
}
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php",
"line": 145,
"function": "wrapException",
"class": "Doctrine\\DBAL\\DBALException",
"type": "::",
"args": [
{
"__class__": "Doctrine\\DBAL\\Driver\\PDOMySql\\Driver"
},
{
"errorInfo": [
"40001",
1213,
"Deadlock found when trying to get lock; try restarting transaction"
],
"__class__": "Doctrine\\DBAL\\Driver\\PDOException"
},
"An exception occurred while executing 'UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, ?), `etag` = ? WHERE (`storage` = ?) AND (`path_hash` IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'd01bb67e7b71dd49fd06bad922f521c9'))' with params [1598537171, \"5f47bdd345199\", 1]:\n\nSQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction"
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php",
"line": 1063,
"function": "driverExceptionDuringQuery",
"class": "Doctrine\\DBAL\\DBALException",
"type": "::",
"args": [
{
"__class__": "Doctrine\\DBAL\\Driver\\PDOMySql\\Driver"
},
{
"errorInfo": [
"40001",
1213,
"Deadlock found when trying to get lock; try restarting transaction"
],
"__class__": "Doctrine\\DBAL\\Driver\\PDOException"
},
"UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, ?), `etag` = ? WHERE (`storage` = ?) AND (`path_hash` IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'd01bb67e7b71dd49fd06bad922f521c9'))",
{
"1": 1598537171,
"2": "5f47bdd345199",
"3": 1
}
]
},
{
"file": "/var/www/nextcloud/lib/private/DB/Connection.php",
"line": 214,
"function": "executeUpdate",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, ?), `etag` = ? WHERE (`storage` = ?) AND (`path_hash` IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'd01bb67e7b71dd49fd06bad922f521c9'))",
[
1598537171,
"5f47bdd345199",
1
],
[
1,
2,
1
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php",
"line": 203,
"function": "executeUpdate",
"class": "OC\\DB\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, :dcValue1), `etag` = :dcValue2 WHERE (`storage` = :dcValue3) AND (`path_hash` IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'd01bb67e7b71dd49fd06bad922f521c9'))",
{
"dcValue1": 1598537171,
"dcValue2": "5f47bdd345199",
"dcValue3": 1
},
{
"dcValue1": 1,
"dcValue2": 2,
"dcValue3": 1
}
]
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 216,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Propagator.php",
"line": 101,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Updater.php",
"line": 166,
"function": "propagateChange",
"class": "OC\\Files\\Cache\\Propagator",
"type": "->",
"args": [
"files/Photos/hvkjbhvbkljmknbm.png",
1598537171
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 329,
"function": "remove",
"class": "OC\\Files\\Cache\\Updater",
"type": "->",
"args": [
"files/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 1173,
"function": "removeUpdate",
"class": "OC\\Files\\View",
"type": "->",
"args": [
{
"cache": {
"__class__": "OC\\Files\\Cache\\Cache"
},
"scanner": null,
"watcher": null,
"propagator": {
"__class__": "OC\\Files\\Cache\\Propagator"
},
"updater": {
"__class__": "OC\\Files\\Cache\\Updater"
},
"__class__": "OCA\\Files_Trashbin\\Storage"
},
"files/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 718,
"function": "basicOperation",
"class": "OC\\Files\\View",
"type": "->",
"args": [
"unlink",
"/Photos/hvkjbhvbkljmknbm.png",
[
"delete"
]
]
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
"line": 455,
"function": "unlink",
"class": "OC\\Files\\View",
"type": "->",
"args": [
"/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
"line": 183,
"function": "delete",
"class": "OCA\\DAV\\Connector\\Sabre\\File",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 295,
"function": "delete",
"class": "Sabre\\DAV\\Tree",
"type": "->",
"args": [
"files/nextcloud/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpDelete",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 474,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"method:DELETE",
[
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 251,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 319,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Server.php",
"line": 320,
"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": 167,
"args": [
"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php",
"Line": 34,
"Previous": {
"Exception": "Doctrine\\DBAL\\Driver\\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/lib/Doctrine/DBAL/Connection.php",
"line": 1054,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDOStatement",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/DB/Connection.php",
"line": 214,
"function": "executeUpdate",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, ?), `etag` = ? WHERE (`storage` = ?) AND (`path_hash` IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'd01bb67e7b71dd49fd06bad922f521c9'))",
[
1598537171,
"5f47bdd345199",
1
],
[
1,
2,
1
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php",
"line": 203,
"function": "executeUpdate",
"class": "OC\\DB\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, :dcValue1), `etag` = :dcValue2 WHERE (`storage` = :dcValue3) AND (`path_hash` IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'd01bb67e7b71dd49fd06bad922f521c9'))",
{
"dcValue1": 1598537171,
"dcValue2": "5f47bdd345199",
"dcValue3": 1
},
{
"dcValue1": 1,
"dcValue2": 2,
"dcValue3": 1
}
]
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 216,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Propagator.php",
"line": 101,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Updater.php",
"line": 166,
"function": "propagateChange",
"class": "OC\\Files\\Cache\\Propagator",
"type": "->",
"args": [
"files/Photos/hvkjbhvbkljmknbm.png",
1598537171
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 329,
"function": "remove",
"class": "OC\\Files\\Cache\\Updater",
"type": "->",
"args": [
"files/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 1173,
"function": "removeUpdate",
"class": "OC\\Files\\View",
"type": "->",
"args": [
{
"cache": {
"__class__": "OC\\Files\\Cache\\Cache"
},
"scanner": null,
"watcher": null,
"propagator": {
"__class__": "OC\\Files\\Cache\\Propagator"
},
"updater": {
"__class__": "OC\\Files\\Cache\\Updater"
},
"__class__": "OCA\\Files_Trashbin\\Storage"
},
"files/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 718,
"function": "basicOperation",
"class": "OC\\Files\\View",
"type": "->",
"args": [
"unlink",
"/Photos/hvkjbhvbkljmknbm.png",
[
"delete"
]
]
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
"line": 455,
"function": "unlink",
"class": "OC\\Files\\View",
"type": "->",
"args": [
"/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
"line": 183,
"function": "delete",
"class": "OCA\\DAV\\Connector\\Sabre\\File",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 295,
"function": "delete",
"class": "Sabre\\DAV\\Tree",
"type": "->",
"args": [
"files/nextcloud/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpDelete",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 474,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"method:DELETE",
[
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 251,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 319,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Server.php",
"line": 320,
"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": 167,
"args": [
"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php",
"Line": 119,
"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/lib/Doctrine/DBAL/Driver/PDOStatement.php",
"line": 117,
"function": "execute",
"class": "PDOStatement",
"type": "->",
"args": [
null
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php",
"line": 1054,
"function": "execute",
"class": "Doctrine\\DBAL\\Driver\\PDOStatement",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/DB/Connection.php",
"line": 214,
"function": "executeUpdate",
"class": "Doctrine\\DBAL\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, ?), `etag` = ? WHERE (`storage` = ?) AND (`path_hash` IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'd01bb67e7b71dd49fd06bad922f521c9'))",
[
1598537171,
"5f47bdd345199",
1
],
[
1,
2,
1
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php",
"line": 203,
"function": "executeUpdate",
"class": "OC\\DB\\Connection",
"type": "->",
"args": [
"UPDATE `oc_filecache` SET `mtime` = GREATEST(`mtime`, :dcValue1), `etag` = :dcValue2 WHERE (`storage` = :dcValue3) AND (`path_hash` IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', 'd01bb67e7b71dd49fd06bad922f521c9'))",
{
"dcValue1": 1598537171,
"dcValue2": "5f47bdd345199",
"dcValue3": 1
},
{
"dcValue1": 1,
"dcValue2": 2,
"dcValue3": 1
}
]
},
{
"file": "/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
"line": 216,
"function": "execute",
"class": "Doctrine\\DBAL\\Query\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Propagator.php",
"line": 101,
"function": "execute",
"class": "OC\\DB\\QueryBuilder\\QueryBuilder",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/lib/private/Files/Cache/Updater.php",
"line": 166,
"function": "propagateChange",
"class": "OC\\Files\\Cache\\Propagator",
"type": "->",
"args": [
"files/Photos/hvkjbhvbkljmknbm.png",
1598537171
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 329,
"function": "remove",
"class": "OC\\Files\\Cache\\Updater",
"type": "->",
"args": [
"files/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 1173,
"function": "removeUpdate",
"class": "OC\\Files\\View",
"type": "->",
"args": [
{
"cache": {
"__class__": "OC\\Files\\Cache\\Cache"
},
"scanner": null,
"watcher": null,
"propagator": {
"__class__": "OC\\Files\\Cache\\Propagator"
},
"updater": {
"__class__": "OC\\Files\\Cache\\Updater"
},
"__class__": "OCA\\Files_Trashbin\\Storage"
},
"files/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/lib/private/Files/View.php",
"line": 718,
"function": "basicOperation",
"class": "OC\\Files\\View",
"type": "->",
"args": [
"unlink",
"/Photos/hvkjbhvbkljmknbm.png",
[
"delete"
]
]
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
"line": 455,
"function": "unlink",
"class": "OC\\Files\\View",
"type": "->",
"args": [
"/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
"line": 183,
"function": "delete",
"class": "OCA\\DAV\\Connector\\Sabre\\File",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
"line": 295,
"function": "delete",
"class": "Sabre\\DAV\\Tree",
"type": "->",
"args": [
"files/nextcloud/Photos/hvkjbhvbkljmknbm.png"
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
"line": 89,
"function": "httpDelete",
"class": "Sabre\\DAV\\CorePlugin",
"type": "->",
"args": [
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 474,
"function": "emit",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
"method:DELETE",
[
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 251,
"function": "invokeMethod",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": [
{
"__class__": "Sabre\\HTTP\\Request"
},
{
"__class__": "Sabre\\HTTP\\Response"
}
]
},
{
"file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
"line": 319,
"function": "start",
"class": "Sabre\\DAV\\Server",
"type": "->",
"args": []
},
{
"file": "/var/www/nextcloud/apps/dav/lib/Server.php",
"line": 320,
"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": 167,
"args": [
"/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
],
"function": "require_once"
}
],
"File": "/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php",
"Line": 117
}
},
"CustomMessage": "--"
},
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0",
"version": "19.0.2.2"
}
Same issue for me right after upgrading to 19.0.2, happens with all installations - https://github.com/nextcloud/server/issues/22482#issuecomment-683408188
I have it even with deactivated locking... Very annoying.
Most helpful comment
+1, tons of:
An exception occurred while executing 'UPDATE "oc_filecache" SET "size" = GREATEST(?, "size" + ?) WHERE ("storage" = ?) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', '5128f35c9b4be13788ba41bdb6d1fc1f', 'c54b5adfea9e869da3d8332a2675e327')) AND ("size" > '-1')' with params [-1, 10485760, 1]: SQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected DETAIL: Process 33850 waits for ShareLock on transaction 1591326; blocked by process 35133. Process 35133 waits for ShareLock on transaction 1591323; blocked by process 33850. HINT: See server log for query details. CONTEXT: while locking tuple (61,19) in relation "oc_filecache"this is with 18.0.3 on FreeBSD 12.1 / PostgreSQL 11.6