Fatal error: Doctrine\DBAL\Exception\DriverException
Steps to reproduce
not known
Expected behaviour
not an error
Actual behaviour
3 fatal errors. all within 3 seconds and similar to the one below:
================= Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'UPDATE "oc_filecache" SET "mtime" = GREATEST("mtime", ?), "etag" = ? WHERE ("storage" = ?) AND ("path_hash" IN ('d41d8cd98f00b204e9800998ecf8427e', '45b963397aa40d4a0063e0d85e4fe7a1', '523eddca5f2dcfc94b3e48d2ebbd3174', '27d148ba2b121948face1754ddf230f8'))' with params [1501241136, "5991554a980d3", 7]: SQLSTATE[40P01]: Deadlock detected: 7 ERROR: deadlock detected DETAIL: Process 617 waits for ShareLock on transaction 458102; blocked by process 615. Process 615 waits for ShareLock on transaction 458104; blocked by process 617. HINT: See server log for query details. CONTEXT: while updating tuple (15,135) in relation "oc_filecache"
- /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php - line 128: Doctrine\DBAL\Driver\AbstractPostgreSQLDriver->convertException('An exception oc...', Object(Doctrine\DBAL\Driver\PDOException))
- /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php - line 1015: Doctrine\DBAL\DBALException driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDOPgSql\Driver), Object(Doctrine\DBAL\Driver\PDOException), 'UPDATE "oc_file...', Array)
- /var/www/nextcloud/lib/private/DB/Connection.php - line 213: Doctrine\DBAL\Connection->executeUpdate('UPDATE "oc_file...', Array, Array)
- /var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php - line 208: OC\DB\Connection->executeUpdate('UPDATE "oc_file...', Array, Array)
- /var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php - line 213: Doctrine\DBAL\Query\QueryBuilder->execute()
- /var/www/nextcloud/lib/private/Files/Cache/Propagator.php - line 100: OC\DB\QueryBuilder\QueryBuilder->execute()
- /var/www/nextcloud/lib/private/Files/Cache/HomePropagator.php - line 49: OC\Files\Cache\Propagator->propagateChange('files/VTT_12 ET...', 1501241136, 0)
- /var/www/nextcloud/lib/private/Files/Cache/Updater.php - line 138: OC\Files\Cache\HomePropagator->propagateChange('files/VTT_12 ET...', 1501241136, 0)
- /var/www/nextcloud/lib/private/Files/View.php - line 321: OC\Files\Cache\Updater->update('files/VTT_12 ET...', 1501241136)
- /var/www/nextcloud/lib/private/Files/View.php - line 1154: OC\Files\View->writeUpdate(Object(OCA\Files_Trashbin\Storage), 'files/VTT_12 ET...', 1501241136)
- /var/www/nextcloud/lib/private/Files/View.php - line 559: OC\Files\View->basicOperation('touch', '/VTT_12 ETT DRO...', Array, 1501241136)
- /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php - line 215: OC\Files\View->touch('/VTT_12 ETT DRO...', 1501241136)
- /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php - line 151: OCA\DAV\Connector\Sabre\File->put(Resource id #9)
- /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 1096: OCA\DAV\Connector\Sabre\Directory->createFile('VTT_12_DROPBOAR...', Resource id #9)
- /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 525: Sabre\DAV\Server->createFile('files/mriesenka...', Resource id #9, NULL)
- [internal function] Sabre\DAV\CorePlugin->httpPut(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
- /var/www/nextcloud/3rdparty/sabre/event/lib/EventEmitterTrait.php - line 105: call_user_func_array(Array, Array)
- /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 479: Sabre\Event\EventEmitter->emit('method PUT', Array)
- /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php - line 254: Sabre\DAV\Server->invokeMethod(Object(Sabre\HTTP\Request), Object(Sabre\HTTP\Response))
- /var/www/nextcloud/apps/dav/lib/Server.php - line 253: Sabre\DAV\Server->exec()
- /var/www/nextcloud/apps/dav/appinfo/v2/remote.php - line 33: OCA\DAV\Server->exec()
- /var/www/nextcloud/remote.php - line 162: require_once('/var/www/nextcl...') {main}
=================
General server configuration
Operating system: Linux nextcloud.systemsnavigator.com 4.4.0-87-generic #110-Ubuntu SMP Tue Jul 18 12:55:35 UTC 2017 x86_64
Web server: Apache/2.4.18 (Ubuntu) (apache2handler)
Database: pgsql PostgreSQL 9.5.7 on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609, 64-bit
PHP version: 7.0.22-0ubuntu0.16.04.1
PHP-modules loaded
- Core
- date
- libxml
- openssl
- pcre
- zlib
- filter
- hash
- Reflection
- SPL
- session
- standard
- apache2handler
- redis
- PDO
- xml
- calendar
- ctype
- curl
- dom
- mbstring
- fileinfo
- ftp
- gd
- gettext
- iconv
- imap
- intl
- json
- ldap
- exif
- mcrypt
- pdo_pgsql
- pgsql
- Phar
- posix
- readline
- shmop
- SimpleXML
- smbclient
- sockets
- sysvmsg
- sysvsem
- sysvshm
- tokenizer
- wddx
- xmlreader
- xmlwriter
- xsl
- zip
- libsmbclient
- Zend OPcache
Nextcloud configuration
Nextcloud version: 12.0.1 - 12.0.1.5
Updated from an older Nextcloud/ownCloud or fresh install: Fresh install
Where did you install Nextcloud from:
VM
Are you using external storage, if yes which one: files_external is disabled
Are you using encryption: no
Are you using an external user-backend, if yes which one: YOUR ANSWER HERE (LDAP/ActiveDirectory/Webdav/...)
Signing status
[]
Enabled apps
- activity: 2.5.2
- comments: 1.2.0
- dav: 1.3.0
- federatedfilesharing: 1.2.0
- files: 1.7.2
- files_sharing: 1.4.0
- files_texteditor: 2.4.1
- files_trashbin: 1.2.0
- files_versions: 1.5.0
- issuetemplate: 0.2.2
- logreader: 2.0.0
- lookup_server_connector: 1.0.0
- nextcloud_announcements: 1.1
- notifications: 2.0.0
- oauth2: 1.0.5
- password_policy: 1.2.2
- provisioning_api: 1.2.0
- serverinfo: 1.2.0
- sharebymail: 1.2.0
- theming: 1.3.0
- twofactor_backupcodes: 1.1.1
- updatenotification: 1.2.0
- user_ldap: 1.2.1
- workflowengine: 1.2.0
Disabled apps
- admin_audit
- encryption
- federation
- files_external
- files_pdfviewer
- files_videoplayer
- firstrunwizard
- gallery
- survey_client
- systemtags
- user_external
Content of config/config.php
{
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"localhost",
"192.168.11.131",
"nextcloud.systemsnavigator.com"
],
"datadirectory": "\/var\/ncdatamnt",
"overwrite.cli.url": "https:\/\/nextcloud.systemsnavigator.com\/",
"dbtype": "pgsql",
"version": "12.0.1.5",
"dbname": "nextcloud_db",
"dbhost": "localhost",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"instanceid": "oc6fxph0akpf",
"mail_smtpmode": "smtp",
"memcache.local": "\\OC\\Memcache\\Redis",
"filelocking.enabled": true,
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "\/var\/run\/redis\/redis.sock",
"port": 0,
"timeout": 0,
"dbindex": 0,
"password": "***REMOVED SENSITIVE VALUE***"
},
"htaccess.RewriteBase": "\/",
"loglevel": 2,
"log_type": "file",
"logfile": "\/var\/ncdatamnt\/nextcloud.log",
"logtimezone": "Europe\/Amsterdam",
"maintenance": false,
"mail_from_address": "support",
"mail_smtpauthtype": "LOGIN",
"mail_domain": "systemsnavigator.com",
"mail_smtpauth": 1,
"mail_smtphost": "smtp.office365.com",
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpsecure": "tls",
"ldapIgnoreNamingRules": false,
"ldapProviderFactory": "\\OCA\\User_LDAP\\LDAPProviderFactory",
"skeletondirectory": "",
"updater.release.channel": "stable"
}
Client configuration
Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063
Operating system: Windows 10
Logs
Nextcloud log (data/nextcloud.log)
cc @enoch85
@mwries
- How long have you run PostgreSQL?
- Did you update from MariaDB/MySQL to PostgreSQL or was it a clean install?
- How long did the server run on PostgreSQL before this happened?
- Have you tried to manually configure
postgres.conf?
@BernhardPosselt You seem to know PostgreSQL well. Do you know what's happened here?
Check the error it's a deadlock
@BernhardPosselt Yea, I can read that much, just wondered if you knew what could have caused it.
A quick googleing of the issue: https://stackoverflow.com/a/18299180
@mwries Slow server?
- NC was installed from VM script by @enoch85 3 weeks ago. Fresh install. I did not touch any conf files. I do run the update.sh script regularly.
- Server is pretty OK: 2 cores, 2GB ram. Data is mounted on a Synology NAS. Never noticed any lag whatsoever.
cc @icewind1991 @nickvergessen Any idea?
Check the transaction isolation level, is it repeatable-read?
I have a similar deadlock issue running Postgres 9.5.8 and nextcloud 12.0.2 on Ubuntu 16.04.3 LTS. This is a fresh install of nextcloud with an almost totally standard config, the only thing that I've changed is adding an S3 external storage backend.
I have changed the transaction isolation level to repeatable-read but it made no difference.
My postgres logs are full of the following errors:
2017-08-19 11:58:42 UTC ERROR: deadlock detected
2017-08-19 11:58:42 UTC DETAIL: Process 23119 waits for ShareLock on transaction 363051; blocked by process 23135.
Process 23135 waits for ShareLock on transaction 363042; blocked by process 23119.
Process 23119: UPDATE "oc_file_locks" SET "lock" = "lock" -1 WHERE ("key" IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100)) AND ("lock" > 0)
Process 23135: UPDATE "oc_file_locks" SET "lock" = "lock" + 1, "ttl" = $1 WHERE "key" = $2 AND "lock" >= 0
2017-08-19 11:58:42 UTC HINT: See server log for query details.
2017-08-19 11:58:42 UTC CONTEXT: while updating tuple (59,171) in relation "oc_file_locks"
2017-08-19 11:58:42 UTC STATEMENT: UPDATE "oc_file_locks" SET "lock" = "lock" -1 WHERE ("key" IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100)) AND ("lock" > 0)
Every now and then there are long runs of the following:
2017-08-19 11:58:41 UTC ERROR: deadlock detected
2017-08-19 11:58:41 UTC DETAIL: Process 23120 waits for ShareLock on transaction 363042; blocked by process 23119.
Process 23119 waits for ShareLock on transaction 363026; blocked by process 23120.
Process 23120: UPDATE "oc_file_locks" SET "lock" = "lock" + 1, "ttl" = $1 WHERE "key" = $2 AND "lock" >= 0
Process 23119: UPDATE "oc_file_locks" SET "lock" = "lock" -1 WHERE ("key" IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20, $21, $22, $23, $24, $25, $26, $27, $28, $29, $30, $31, $32, $33, $34, $35, $36, $37, $38, $39, $40, $41, $42, $43, $44, $45, $46, $47, $48, $49, $50, $51, $52, $53, $54, $55, $56, $57, $58, $59, $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $100)) AND ("lock" > 0)
2017-08-19 11:58:41 UTC HINT: See server log for query details.
2017-08-19 11:58:41 UTC CONTEXT: while updating tuple (7,110) in relation "oc_file_locks"
2017-08-19 11:58:41 UTC STATEMENT: UPDATE "oc_file_locks" SET "lock" = "lock" + 1, "ttl" = $1 WHERE "key" = $2 AND "lock" >= 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: UPDATE "oc_filecache" SET "mtime" = $1, "etag" = $2, "storage_mtime" = $3, "checksum"=$4 WHERE ("mtime" <> $5 OR "etag" <> $6 OR "storage_mtime" <> $7 OR "checksum" <> $8 OR "mtime" IS NULL OR "etag" IS NULL OR "storage_mtime" IS NULL OR "checksum" IS NULL) AND "fileid" = $9
2017-08-19 11:58:41 UTC ERROR: current transaction is aborted, commands ignored until end of transaction block
2017-08-19 11:58:41 UTC STATEMENT: INSERT INTO "oc_file_locks" ("key","lock","ttl") SELECT $1,$2,$3 FROM "oc_file_locks" WHERE "key" = $4 HAVING COUNT(*) = 0
Let me know if you need any more info.
@nickvergessen Do you need more info?
Sorry, I was asking if it was that value, because that one doesn't work.
As per https://docs.nextcloud.com/server/11/admin_manual/configuration_database/linux_database_configuration.html?highlight=transaction%20level#database-read-commited-transaction-isolation-level we need READ COMMITED
READ_COMMITED is the default in PosgreSQL and also in the VM as I haven't changed anything: https://www.postgresql.org/docs/9.6/static/sql-set-transaction.html
In more recent versions (13.0.4 and 12.0.9) we reduced drastically the amount of lock statements which should avoid most of the problems in here. Thus I will close it. If there is still stuff that breaks have a look at #9305 and it's linked issues.
@MorrisJobke Sorry to bother but I seem to be having a similar issue here: https://github.com/nextcloud/server/issues/12343
I'm not entirely clear on what this issue actually is though? It seems that it has something to do with a bunch of files being locked due to something with pgsql?
Fatal webdav Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT path FROM oc_filecache WHERE fileid = ? AND storage = ?' with params [45676, 2]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away
The response has been 'Not a Error' and closed the issue. Hmmm....
What is needed is the remote peer's nicname that called this into effect, then look over that unknown at this moment remote peers activity on Nextcloud.
This looks like a deliberate attack until the unknown peer's nicname is found and their activity's are looked over. This looks like a serious error that slipped past the NC developers and still exists to exploit.
Ubuntu Bionic LTS/ Mint 19 Tara Clean install on the OS, Snap Nextcloud, newest snap nextcloud release.
I have the same issue as in the first post with Nextcloud 16.0.3. Did not change any config lately. This never happened before.
As ASMith is mentioning an "attack", do i have to worry? If yes what measures are to be taken?
No, there is no known attack vector here.