ITADN

PostgreSQL duplicate key value violates unique constraint "oc_filecache_extended_pkey"

#61563Closeddietmarhein 创建于 2026-06-24
D
dietmarheincommented
**Steps to reproduce** 1. Start Nextcloud AIO 2. Wait, no interaction at all, no file upload, ... 3. Have a look to database logs **Expected behavior** no key value violations **Actual behavior** ``` 2026-06-24 06:48:09.658 CEST [336893] ERROR: duplicate key value violates unique constraint "oc_filecache_extended_pkey" 2026-06-24 06:48:09.658 CEST [336893] DETAIL: Key (fileid)=(1044313) already exists. 2026-06-24 06:48:09.658 CEST [336893] STATEMENT: INSERT INTO "oc_filecache_extended" ("fileid", "creation_time") VALUES($1, $2) 2026-06-24 06:48:09.774 CEST [336893] ERROR: duplicate key value violates unique constraint "oc_filecache_extended_pkey" 2026-06-24 06:48:09.774 CEST [336893] DETAIL: Key (fileid)=(1044312) already exists. 2026-06-24 06:48:09.774 CEST [336893] STATEMENT: INSERT INTO "oc_filecache_extended" ("fileid", "creation_time") VALUES($1, $2) 2026-06-24 07:48:10.357 CEST [356981] ERROR: duplicate key value violates unique constraint "oc_filecache_extended_pkey" 2026-06-24 07:48:10.357 CEST [356981] DETAIL: Key (fileid)=(1044313) already exists. 2026-06-24 07:48:10.357 CEST [356981] STATEMENT: INSERT INTO "oc_filecache_extended" ("fileid", "creation_time") VALUES($1, $2) 2026-06-24 07:48:10.456 CEST [356981] ERROR: duplicate key value violates unique constraint "oc_filecache_extended_pkey" 2026-06-24 07:48:10.456 CEST [356981] DETAIL: Key (fileid)=(1044312) already exists. 2026-06-24 07:48:10.456 CEST [356981] STATEMENT: INSERT INTO "oc_filecache_extended" ("fileid", "creation_time") VALUES($1, $2) ``` **Issue is causing high iostat to SSD and RAM usage from PostgreSQL. Host is nearly not usable any more due to heavy load.** _What has been done so far:_ 1. cleanup DB - delete from table or truncate table oc_filecache_extended 2. check and adopted mount settings for btrfs; chattr +C for databasefile 3. disabled and uninstalled Memories App 4. disabled and uninstalled Group Folders App **Other information** Host OS Debian 12 bookworm: 6.1.174-1 (2026-05-26) x86_64 GNU/Linux Nextcloud AIO: NC 33.0.5 PostgreSQL 18.4 **Output of sudo docker info** ``` Client: Docker Engine - Community Version: 29.6.0 Context: default Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.34.1 Path: /usr/libexec/docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v5.1.4 Path: /usr/libexec/docker/cli-plugins/docker-compose Server: Containers: 13 Running: 12 Paused: 0 Stopped: 1 Images: 13 Server Version: 29.6.0 Storage Driver: overlay2 Backing Filesystem: btrfs Supports d_type: true Using metacopy: false Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: systemd Cgroup Version: 2 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog CDI spec directories: /etc/cdi /var/run/cdi Swarm: inactive Runtimes: runc io.containerd.runc.v2 Default Runtime: runc Init Binary: docker-init containerd version: e53c7c1516c3b2bff98eb76f1f4117477e6f4e66 runc version: v1.3.6-0-g491b69ba init version: de40ad0 Security Options: apparmor seccomp Profile: builtin cgroupns Kernel Version: 6.1.0-49-amd64 Operating System: Debian GNU/Linux 12 (bookworm) OSType: linux Architecture: x86_64 CPUs: 4 Total Memory: 15.37GiB Name: morpheus ID: d7c93caa-e386-48f0-88c1-c9879f0afbee Docker Root Dir: /data/docker Debug Mode: false Experimental: false Insecure Registries: ::1/128 127.0.0.0/8 Live Restore Enabled: false Firewall Backend: iptables EnableUserlandProxy: true UserlandProxyPath: /usr/bin/docker-proxy ```
关闭于 2026-06-25 1 条评论