Skip to content

Large queries can slow down server #1003

Open
@joepio

Description

@joepio

Today I tried to list all commits and sort them by date. An extremely large query to run (most queries are scoped to one drive
and don't hit the most common resource). This basically broke the server. I'm assuming the heavy part here was the sorting.

Screenshot 2024-10-28 at 15 48 45

Luckily, an index for a query like this only has to be built once. After that, it should be fast again.

Solutions

  • Don't allow any process take up 100% CPU
  • Don't allow any process to take longer than x seconds
  • Don't allow a user (except for a sudo user) to do a query like this
  • Always scope queries by drive

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions