Plume-org / Plume

Federated blogging application, thanks to ActivityPub (now on https://git.joinplu.me/ — this is just a mirror)

Home Page:https://joinplu.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Infinity loop: duplicate key value violates unique constraint "post_unique_slug"

manalejandro opened this issue · comments

commented

Hi, sometimes my instance is doing infinity loops with this message in Docker containers:

plume             | thread 'pool-thread-#5' panicked at 'Article from remote user couldn't be saved: Db(DatabaseError(UniqueViolation, "duplicate key value violates unique constraint \"post_unique_slug\""))', plume-models/src/remote_fetch_actor.rs:76:30
plume-postgres    | ERROR:  duplicate key value violates unique constraint "post_unique_slug"
  • Plume version: Plume 0.6.1-dev with official Dockerfile image
  • Operating system: RaspiOS - Debian Buster with Docker
  • Web Browser: none

Ah, so this is happening when an article from a remote host has the same title as another in the same blog.

@manalejandro Thank you for reporting. Could you paste more logs around two lines you provided?
@epsilon-phase Thanks great pointing.

commented

@manalejandro Thank you for reporting. Could you paste more logs around two lines you provided?
@epsilon-phase Thanks great pointing.

Yes it happens sometimes not everytime and i have no one article with then same title... attacks? 🤷

plume-postgres    | 2021-05-13 08:23:25.881 UTC [17772] ERROR:  duplicate key value violates unique constraint "post_unique_slug"
plume-postgres    | 2021-05-13 08:23:25.881 UTC [17772] DETAIL:  Key (blog_id, slug)=(3, roadmap) already exists.
plume-postgres    | 2021-05-13 08:23:25.881 UTC [17772] STATEMENT:  INSERT INTO "posts" ("blog_id", "slug", "title", "content", "published", "license", "creation_date", "ap_url", "subtitle", "source", "cover_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, DEFAULT)
plume             | thread 'pool-thread-#1' panicked at 'Article from remote user couldn't be saved: Db(DatabaseError(UniqueViolation, "duplicate key value violates unique constraint \"post_unique_slug\""))', plume-models/src/remote_fetch_actor.rs:76:30
plume-postgres    | 2021-05-13 08:23:31.435 UTC [17772] ERROR:  duplicate key value violates unique constraint "post_unique_slug"
plume-postgres    | 2021-05-13 08:23:31.435 UTC [17772] DETAIL:  Key (blog_id, slug)=(3, roadmap) already exists.
plume-postgres    | 2021-05-13 08:23:31.435 UTC [17772] STATEMENT:  INSERT INTO "posts" ("blog_id", "slug", "title", "content", "published", "license", "creation_date", "ap_url", "subtitle", "source", "cover_id") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, DEFAULT)
plume             | thread 'pool-thread-#1' panicked at 'Article from remote user couldn't be saved: Db(DatabaseError(UniqueViolation, "duplicate key value violates unique constraint \"post_unique_slug\""))', plume-models/src/remote_fetch_actor.rs:76:30
commented

I finally discovered that I was under attack until June 2021 and they filled my resources folder with 10Gb of photos, check the API, greetings.