[RESOLVED] Sonarqube is slow since update to 8.4.1

Hello,

We was previously on Sonarqube 8.2 with postgres 9.5 and we have migrate today to Sonarqube 8.4.1 with postgres 11.
The postgres migration succeeded, then we have start Sonarqube 8.4.1 and it starts its migration, the migration succeeded too in 25 minutes approximately.

But now the sonarqube is super slow and the postgres instance burns all the CPU. We notice that some request seems really slow like the following one, which runs since 16 minutes and counting.

      |                 |           |                                                                                                               +
      |                 |           |     p.organization_uuid as organizationUuid,                                                                  +
      |                 |           |     p.uuid as uuid,                                                                                           +
      |                 |           |     p.uuid_path as uuidPath,                                                                                  +
      |                 |           |     p.project_uuid as projectUuid,                                                                            +
      |                 |           |     p.module_uuid as moduleUuid,                                                                              +
      |                 |           |     p.module_uuid_path as moduleUuidPath,                                                                     +
      |                 |           |     p.main_branch_project_uuid as mainBranchProjectUuid,                                                      +
      |                 |           |     p.kee as kee,                                                                                             +
      |                 |           |     p.name as name,                                                                                           +
      |                 |           |     p.long_name as longName,                                                                                  +
      |                 |           |     p.description as description,                                                                             +
      |                 |           |     p.qualifier as qualifier,                                                                                 +
      |                 |           |     p.scope as scope,                                                                                         +
      |                 |           |     p.language as language,                                                                                   +
      |                 |           |     p.root_uuid as rootUuid,                                                                                  +
      |                 |           |     p.path as path,                                                                                           +
      |                 |           |     p.enabled as enabled,                                                                                     +
      |                 |           |     p.copy_component_uuid as copyComponentUuid,                                                               +
      |                 |           |     p.private as isPrivate,                                                                                   +
      |                 |           |     p.created_at as createdAt                                                                                 +
      |                 |           |                                                                                                               +
      |                 |           |     FROM components p                                                                                         +
      |                 |           |                                                                                                               +
      |                 |           |     INNER JOIN components module ON                                                                           +
      |                 |           |       module.project_uuid = p.project_uuid                                                                    +
      |                 |           |       and module.organization_uuid = p.organization_uuid                                                      +
      |                 |           |       and module.uuid = $1                                                                                    +
      |                 |           |       and module.scope='PRJ' AND module.enabled = true                                                        +
      |                 |           |     where                                                                                                     +
      |                 |           |       p.scope = $2                                                                                            +
      |                 |           |                                                                                                               +
      |                 |           |         and p.enabled = true                                                                                  +
      |                 |           |                                                                                                               +
      |                 |           |       and                                                                                                     +
      |                 |           |                                                                                                               +
      |                 |           |           p.module_uuid_path LIKE module.modu

We saw nothing weird in the postgres logs, or sonarqube logs except the following message

worker <id> found no pending task (including indexation task). Disabling indexation task lookup for this worker until next SonarQube restart.

Is there any problem with postgres 11 or sonarqube 8.4.1 ?

Thanks, Guillaume

Hi Guillaume,

8.4 included a lot of changes to the DB schema, so I guess maybe Postgres needs a little extra love this time. The docs include a recommendation that after upgrade you VACUUM FULL. If that doesn’t help, please come back and let us know.

 
Ann

1 Like

Hi,

Thank you, that’s work. I already did a lot of migration for Sonarqube but I never had this problem.
The VACUUM has made Sonarqube fast as usual.
I had to force a reindex of ES too but now it’s okay.

Thanks again.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.