Skip to content

14.0.4: PostgreSQL Duplicate key value violates unique constraint lock_key_index #12729

@torrentkino

Description

@torrentkino

Steps to reproduce

  1. Use Nextcloud-14.0.4 + php-fpm + nginx + PostgreSQL
  2. Only one single user needed

Expected behaviour

No error messages.

Actual behaviour

Too many error messages:

$ sudo egrep '2018-11-29.*duplicate key value violates unique constraint "lock_key_index"'
/var/log/postgresql/postgresql-11-main.log | wc -l
15484

Those error messages look like this:
nextcloud@nextcloud ERROR: duplicate key value violates unique constraint "lock_key_index"
nextcloud@nextcloud DETAIL: Key (key)=(files/5f46d7639d8049fc652b79286a38d339) already exists.
nextcloud@nextcloud STATEMENT: INSERT INTO "oc_file_locks" ("key", "lock", "ttl") VALUES($1, $2, $3)

Server configuration

Operating system: Debian/Buster

Web server: nginx-1.14.1-1

Database: PostgreSQL-11

PHP version: 7.3

Nextcloud version: 14.0.4

Updated from an older Nextcloud/ownCloud or fresh install: Updates vom 13.x

Where did you install Nextcloud from: Official package. No docker.

List of activated apps:

Enabled:

  • accessibility: 1.0.1
  • activity: 2.7.0
  • audioplayer: 2.4.1
  • bookmarks: 0.14.2
  • bruteforcesettings: 1.2.0
  • calendar: 1.6.4
  • cloud_federation_api: 0.0.1
  • comments: 1.4.0
  • contacts: 2.1.7
  • dav: 1.6.0
  • deck: 0.5.0
  • federatedfilesharing: 1.4.0
  • federation: 1.4.0
  • files: 1.9.0
  • files_pdfviewer: 1.3.2
  • files_sharing: 1.6.2
  • files_texteditor: 2.6.0
  • files_trashbin: 1.4.1
  • files_versions: 1.7.1
  • files_videoplayer: 1.3.0
  • firstrunwizard: 2.3.0
  • gallery: 18.1.0
  • logreader: 2.0.0
  • lookup_server_connector: 1.2.0
  • news: 13.0.3
  • nextcloud_announcements: 1.3.0
  • notes: 2.5.0
  • notifications: 2.2.1
  • oauth2: 1.2.1
  • password_policy: 1.4.0
  • previewgenerator: 2.0.0
  • provisioning_api: 1.4.0
  • serverinfo: 1.4.0
  • sharebymail: 1.4.0
  • support: 1.0.0
  • survey_client: 1.2.0
  • systemtags: 1.4.0
  • theming: 1.5.0
  • twofactor_backupcodes: 1.3.1
  • updatenotification: 1.4.1
  • workflowengine: 1.4.0
    Disabled:
  • admin_audit
  • encryption
  • files_external
  • user_external
  • user_ldap

Nextcloud configuration:

{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"foo.torrentkino.de"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"overwrite.cli.url": "https://foo.torrentkino.de",
"memcache.local": "\OC\Memcache\APCu",
"dbtype": "pgsql",
"version": "14.0.4.2",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"maintenance": false,
"theme": "",
"loglevel": 2,
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "LOGIN",
"mail_smtpsecure": "tls",
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtpauth": 1,
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "587",
"mail_smtpname": "REMOVED SENSITIVE VALUE",
"mail_smtppassword": "REMOVED SENSITIVE VALUE",
"updater.release.channel": "stable"
}
}

Are you using external storage, if yes which one: No

Are you using encryption: No

Are you using an external user-backend, if yes which one: No

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions