Analysis report processing takes too long for some projects

Community Edition Version 8.9 (build 43852)

We upgraded to SonarQube 8.9LTS on Oct 16. All was good until October 29 when we noticed that analysis times for some projects were taking longer than normal times (we checked previous times in the Project Background Tasks). As an example, a project master branch that normally would take 2.50mins last week was taking between 15 – 16mins on October 29.

In searching the e Compute Engine logs for those projects, we noticed that the “Execute component visitors" step was taking 75% of time. In project example mentioned above the step took 14.31mins. We noticed the same for other projects that are taking a long time to execute.

Due to the above, there were over 584 Pending Background Tasks at a certain point. We restarted the SonarQube service, but we are still facing the issue.

Could you please guide us on how we can resolve this issue.

Thanks

Hi,

With your upgrade, did you perform the DB housekeeping described in the docs?

 
Ann

Hi Ann,

We did not perform the VACUUM FULL.

Patricia

Hi Patricia,

Could you try that?

 
Ann

I thought this was included as part of the post upgrade when you go to https://url/setup, but we ran into the same issue when upgrading from docker running v9.8 to v9.9.1. However, we upgrade SQ from v9.5(?) to v9.8 and prior to that major update from v7.

I see in the v9.9.1 notes there is a section for postgres.

Additional database maintenance

Once you’ve finished a technical upgrade, you should rebuild database indexes and refresh database statistics before starting SonarQube and reanalyzing your projects.

For PostgreSQL, that means executing three operations:

  1. VACUUM FULL
  2. REINDEX DATABASE <db>
  3. ANALYZE

According to the PostgreSQL documentation:

In normal PostgreSQL operation, tuples that are deleted or obsoleted by an update are not physically removed from their table; they remain present until a VACUUM is done.

Hi @dprob,

It’s not clear to me what the question is, but this thread is over 2y old. Please create a new one if you’ve still got questions.

 
Thx,
Ann