DB response is slow and appears to be down

I have…

I’m submitting a…

  • Regression (a behavior that stopped working in a new release)
  • Bug report
  • Performance issue
  • Documentation issue or request

Current behavior

The mongo DB will get slow response sometimes.

Expected behavior

How can I improve the DB performance? Should I delete the old data? I know that there is function ‘delete permanently’. How can I confirm that my version have this function?

Minimal reproduction of the problem

Environment

App Name:

  • Self hosted with docker
  • Self hosted with IIS
  • Self hosted with other version
  • Cloud version

Version: Squidex 4.6.0

Browser:

  • Chrome (desktop)
  • Chrome (Android)
  • Chrome (iOS)
  • Firefox
  • Safari (desktop)
  • Safari (iOS)
  • IE
  • Edge

Others:

Sorry, but your question is too broad. I am not sure how to help here.

Situation

  1. There are 2 schemas contain around 100k contents
  2. It might need 15 seconds to load the data on the contents page
  3. When I use Squidex SDK to insert content, it will be timeout sometimes
  4. During this period, the CPU and Memory is very high.

Question:

  1. If I reduce the number of the content, will it be better in the performance?
  2. I believe that my version [4.6 (2020-06)], does not have permanent delete function. Does soft delete improve the performance?
  3. If soft delete is not good at this scenario, can I delete the content in the MongoDB directly? such as the content in 2021.

Thank you.

In general there are 3 potential culprits:

  1. Your Mongo server. It might just have reached its limits.
  2. Your schema: If you have very large content document (I have seen 10MB+), it will be always slow.
  3. Squidex: For example there could be a bug, that was causing incorrect use of indexes.

You can use the inbuilt profiler to check the performance: Database Profiler - Database Manual - MongoDB Docs

Your version does not have permanent deletion, you could check your content collection, there is problably a “IsDeleted” flag and then you just delete those contneet items with a query.