Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry * for key 'lock_key_index' #11779

Closed
alxdca opened this issue Oct 11, 2018 · 2 comments
Labels

Comments

@alxdca
Copy link

alxdca commented Oct 11, 2018

Hi,

I have a fresh docker install running nextcloud 14.0.1 for a small buisiness. Only one windows client set up at this time. At first sync of large folders, I get sevel errors of this type:
Doctrine\DBAL\Exception\UniqueConstraintViolationException: An exception occurred while executing 'INSERT INTO oc_file_locks (key,lock,ttl) SELECT ?,?,? FROM oc_file_locksWHEREkey = ? HAVING COUNT(*) = 0' with params ["files\/0a4cc8c52d8bec8c9d7aa84e89ba24a4", 1, 1539274230, "files\/0a4cc8c52d8bec8c9d7aa84e89ba24a4"]: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'files/0a4cc8c52d8bec8c9d7aa84e89ba24a4' for key 'lock_key_index'

During these files sync, I've seen the mysqld process regularly using 100% of a CPU core.

Expected behaviour

First sync of large folders with Windows 10 Client should sync all files without errors

Actual behaviour

Lot of Integrity constraint violation: 1062 Duplicate entry errors

Server configuration

Operating system: Openmediavault + Docker

Web server: Nginx official docker container

Database: Mariadb official docker container
Container created with command: --transaction-isolation=READ-COMMITTED
Binary log disabled

PHP version:

Nextcloud version: Nextcloud official docker container 14.0.1

Updated from an older Nextcloud/ownCloud or fresh install: Fresh install

Where did you install Nextcloud from: Docker image

@nextcloud-bot
Copy link
Member

GitMate.io thinks possibly related issues are #1779 (Webdav Calendar Integrity constraint violation: 1062 Duplicate entry), #7389 (Integrity constraint violation: 19 NOT NULL constraint failed: oc_filecache.storage_mtime), #366 (PostgreSQL: violation of constraints), #7446 (Update 12.0.3 12.0.4 SQLSTATE[23000] :Integrity constraint violation), and #6343 (PostgreSQL : duplicate key value violates unique constraint error message).

@MorrisJobke
Copy link
Member

Duplicate of #9305

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants