PeerTube icon indicating copy to clipboard operation
PeerTube copied to clipboard

Stop ActivityPub fetcher jobs on unfollow

Open vid-bin opened this issue 1 year ago • 4 comments

Describe the current behavior

*Follow a popular instance of peertube *Unfollow popular instance of peertube *Videos get removed *Comments remain after restarting peertube *Activitypub-http-fetcher remains even after restarting peertube with random instances (not the one followed). *CPU usage on a 3900x with a single core is in the 30% range for the peertube process.

Steps to reproduce

No response

Describe the expected behavior

All activity ceases and comments get deleted.

Additional information

  • PeerTube instance:
    • URL: vidbin.org
    • Version: 6.0.3
    • NodeJS version: 20.11.0
    • Ffmpeg version: git

vid-bin avatar Feb 16 '24 05:02 vid-bin

Hello,

External fetched objects like videos or comments are not deleted from the database. We can imagine a "prune" maintenance job. I suggest to create a dedicated issue for this feature request.

Chocobozzz avatar Feb 16 '24 10:02 Chocobozzz

Hello,

External fetched objects like videos or comments are not deleted from the database. We can imagine a "prune" maintenance job. I suggest to create a dedicated issue for this feature request.

Is there a way to narrow down the CPU usage then?

I removed around 800 comments and the activitypub-http-fetcher ceased and CPU usage went back to 0.

There still are 5000+ comments, so it seems to have been one of the comments I removed causing the CPU usage.

vid-bin avatar Feb 16 '24 10:02 vid-bin

Can you paste the payload of the activitypub-http-fetcher job?

Chocobozzz avatar Feb 16 '24 10:02 Chocobozzz

Can you paste the payload of the activitypub-http-fetcher job?

It's idle now but looking at the logs there are several ECONNREFUSED and Hostname/IP does not match certificate alt names errors. It's probably one of those jobs that was causing the CPU usage. But I'm unsure of how you're supposed to resolve those issues as an instance administrator.

vid-bin avatar Feb 16 '24 10:02 vid-bin