atomic-server icon indicating copy to clipboard operation
atomic-server copied to clipboard

Large queries can slow down server

Open joepio opened this issue 1 year ago • 0 comments

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

joepio avatar Oct 28 '24 14:10 joepio