Sonarqube upgrade (7.1 to 7.9.3) with large number of projects, causes AWS RDS 100% CPU utilization and UI response times to browse existing projects gets timed out

Version upgrade:
Upgraded Sonarqube docker from 7.1-alpine to 7.9.3-community tag.

We are trying to achieve the following
We are trying to upgrade the existing sonar with a large number of projects

As part of the upgrade path, the following are steps done:

  1. Created a new DB (AWS RDS) from a snapshot using PostgreSQL engine 10.12.
  2. New data directory for sonarqube folders.
  3. Changed the docker tag to 7.9.3-community and connected to new RDS bought up from the existing database snapshot.
  4. Followed the instructions to upgrade the DB prompt using /setup URL.
  5. Took some hours for sonar to come up with no error and in logs, Said Sonarqube is up, able to access sonarqube 7.9.3.
  6. But at this point to access the existing analyzed projects it takes a lot of time and gets timed out, observed the Database CPU utilization is 99%, increased the Database CPU and memory settings, but still occupies all the CPU, it goes on occupying how many cores we add, tried restarting sonarqube but did not fix it.
  7. The UI response times are too slow, increased the sonar jvm settings still UI hangs on browsing all the projects, after deleting some projects then sonar UI was fast, but Database says still 99% CPU utilization and not reducing.

Is there a limit to number of projects and is there a way to reduce the CPU utilization? observed this only after the upgrade, should we wait for more than some hours for it to cool down with large number of projects?

Hi, what RDS instance type are you using? Could you enable the RDS performance insight on it and tell us what are the top queries ?

Hey, we are using RDS db.m5.2xlarge instance.