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

PostgreSQL DB errors on upgrade to 30.0.1 #2324

Open
tzerber opened this issue Oct 22, 2024 · 1 comment
Open

PostgreSQL DB errors on upgrade to 30.0.1 #2324

tzerber opened this issue Oct 22, 2024 · 1 comment
Labels

Comments

@tzerber
Copy link
Contributor

tzerber commented Oct 22, 2024

Hi,

Just updated to 30.0.1 one of my dev instances, and I got a bunch of errors from the DB (and other apps ?!) that I currently diagnose. Posting here, because one of them worries me a bit. On the ERROR: duplicate key value violates unique constraint "fs_storage_path_hash" Google provided some tickets in nextcloud/server repository : nextcloud/server#41319 nextcloud/server#37392 but nothing clear on why this happens. The one that worries me more is ERROR: value too long for type character varying(32) knowing databases this should never happen and probably causes data loss.

Nextcloud's logs are somewhat useless at this point (I got other stuff throwing mad amount of errors that I need to fix first, not related to this)

db-1  | 2024-10-22 18:03:11.296 UTC [96783] ERROR:  duplicate key value violates unique constraint "fs_storage_path_hash"
db-1  | 2024-10-22 18:03:11.296 UTC [96783] DETAIL:  Key (storage, path_hash)=(2, b75aea8a75e1a166b1a31d241ff5fc41) already exists.
db-1  | 2024-10-22 18:03:11.296 UTC [96783] STATEMENT:  INSERT INTO "oc_filecache" ("mimepart", "mimetype", "mtime", "size", "etag", "storage_mtime", "permissions", "name", "parent", "checksum", "path_hash", "path", "storage") VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13)
db-1  | 2024-10-22 18:04:15.590 UTC [27] LOG:  checkpoint starting: time
db-1  | 2024-10-22 18:04:26.508 UTC [27] LOG:  checkpoint complete: wrote 109 buffers (0.7%); 0 WAL file(s) added, 0 removed, 0 recycled; write=10.902 s, sync=0.010 s, total=10.919 s; sync files=51, longest=0.002 s, average=0.001 s; distance=542 kB, estimate=542 kB; lsn=4/B2D56540, redo lsn=4/B2D564D0
<snip checkpoints>
db-1  | 2024-10-22 18:31:33.222 UTC [96943] ERROR:  value too long for type character varying(32)
db-1  | 2024-10-22 18:31:33.222 UTC [96943] STATEMENT:  INSERT INTO "oc_jobs" ("class", "argument", "argument_hash", "last_run", "last_checked") VALUES($1, $2, $3, $4, $5)
db-1  | 2024-10-22 18:34:15.979 UTC [27] LOG:  checkpoint starting: time
db-1  | 2024-10-22 18:34:53.521 UTC [27] LOG:  checkpoint complete: wrote 368 buffers (2.2%); 0 WAL file(s) added, 

My compose looks somewhat like this (comments / test stuff removed for shortness)

services:
  db:
    image: postgres:alpine
    restart: unless-stopped
    volumes:
      - db:/var/lib/postgresql/data:Z
    env_file:
      - db.env
    logging:
      driver: "json-file"
      options:
        max-size: "50m"

  app:
    build: ./app
    restart: unless-stopped
    logging:
      driver: "json-file"
      options:
        max-size: "50m"
    volumes:
      - nextcloud:/var/www/html
      - /var/run/docker.sock:/var/run/docker.sock
    environment:
      - POSTGRES_HOST=db
      - REDIS_HOST=redis
    env_file:
      - db.env
    depends_on:
      - db
      - redis
<snip not-relevant stuff, because it is near 250 lines yaml>

Using Dockerfile that has FROM nextcloud:30.0.1-fpm and installs ffmpeg, python poetry and some other non-relevant stuff.

@joshtrichards
Copy link
Member

Sounds like upstream (server) matters. :)

Also see, nextcloud/server#19494, which has more recent activity on it including some related PRs. I haven't had an opportunity to look in-depth though.

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

2 participants