Project data loading extremely slow after Postgres upgrade from 9.5.22 to 12.3

Hello,

We have recently upgraded the SonarQube version to 8.6 on a testing instance, and it worked ok.
However, we now have to upgrade also the Postgres version, from 9.5.22 to 12.3 and it seems that after the DB upgrade, the project data is loading extremely slow (in 3 days, it only loaded 48% of project data).
I have also performed a restart, a VACUUM FULL after the Postgres upgrade and also I have deleted the $SONARQUBE_HOME/data/es7 folder but to no avail.

Also, running this, returns:
select count(project_uuid) from project_branches where need_issue_sync is true;
count
-------
3109
(1 row)

The thing I noticed in the logs is the following:
It says that it uses 10 workers for processing tasks
2021.02.01 08:16:37 INFO ce[][o.s.c.t.CeWorkerController] Compute Engine will use 10 concurrent workers to process tasks

but immediately after we’re getting the following 9 workers being disabled messages:

ce[][o.s.c.t.CeWorkerImpl] worker W1 found no pending task (including indexation task). Disabling indexation task lookup for this worker until next SonarQube restart.
ce[][o.s.c.t.CeWorkerImpl] worker W2 found no pending task (including indexation task). Disabling indexation task lookup for this worker until next SonarQube restart.
ce[][o.s.c.t.CeWorkerImpl] worker W3 found no pending task (including indexation task). Disabling indexation task lookup for this worker until next SonarQube restart.
ce[][o.s.c.t.CeWorkerImpl] worker W4 found no pending task (including indexation task). Disabling indexation task lookup for this worker until next SonarQube restart.
ce[][o.s.c.t.CeWorkerImpl] worker W5 found no pending task (including indexation task). Disabling indexation task lookup for this worker until next SonarQube restart.
ce[][o.s.c.t.CeWorkerImpl] worker W6 found no pending task (including indexation task). Disabling indexation task lookup for this worker until next SonarQube restart.
ce[][o.s.c.t.CeWorkerImpl] worker W7 found no pending task (including indexation task). Disabling indexation task lookup for this worker until next SonarQube restart.
ce[][o.s.c.t.CeWorkerImpl] worker W8 found no pending task (including indexation task). Disabling indexation task lookup for this worker until next SonarQube restart.
ce[][o.s.c.t.CeWorkerImpl] worker W9 found no pending task (including indexation task). Disabling indexation task lookup for this worker until next SonarQube restart.

After this I can see that every 3 minutes, another project data is loaded with the following message:
ce[o.s.c.t.CeWorkerImpl] Execute task | project=P | type=ISSUE_SYNC | branch=B | branchType=BRANCH | id=ID
ce[W10][o.s.c.t.s.ComputationStepExecutor] Ignore orphan component | status=SUCCESS | time=4ms
ce[W10][o.s.c.t.p.t.IndexIssuesStep] indexing issues of branch B
ce[W10][o.s.c.t.s.ComputationStepExecutor] index issues | status=SUCCESS | time=307ms
ce[W10][o.s.c.t.CeWorkerImpl] Executed task | project=P | type=ISSUE_SYNC | branch=B | branchType=BRANCH | id=ID | status=SUCCESS | time=322ms

Do you have any suggestions regarding this?

Thank you!

1 Like

Hey there. Make sure you run ANALYZE as well.

1 Like

Hello! ANALYZE did the trick!
Thank you! :slight_smile:

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