Skip to content

ActivityPub: Outbox loads all posts into the cache, sometimes errors out #3439

@puckipedia

Description

@puckipedia

When loading the outbox of a user, all the public posts of that person are loaded into the cache, but eventually only the first and last post are used to determine the max_id and since_id, and the count (to determine totalItems). This results in the request taking a lot of time and loading all posts into memory (I've seen 8 seconds loading time and even 500's for a user with 5000 posts)

Example: Getting @Gargron's outbox at https://mastodon.social/api/activitypub/users/1/outbox just returns a 500.)


  • I searched or browsed the repo’s other issues to ensure this is not a duplicate.
  • This bug happens on a tagged release and not on master (If you're a user, don't worry about this).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions