SonarQube with PSQL15 - constantly running autovacuum

We are running

  • SonarQube Enterprise
  • deployed:zip
  • PSQL 15 database

We have a problem which is never ending vacuuming on the database level which is hitting the database server (permanent 30-40% cpu usage).
Database server is 16GB ram 8CPU virtual machine.

Auto vacuum processes runs for few minutes then they restarts and run again and again…
When we shutdown SonarQube service and let it run, the autovacuum process runs very long > 25min )…some of the vacuum process then ends some not… (can’t afford to shutdown the service and wait a day until vacuums end… )

I’m wondering why this is happening that if the service is up and running the autovacuum processes on the database level never ends??

The size of the SonarQube database is around 35GB but raising much - like 2GB daily (wondering if this is because the db vacuum is never ending?)

Did anyone had similar problem ? Some advices much appreciated.
Maybe some PSQL 15 autovacuum settings needs to be adjusted - what’s the recommended from Sonar? (didn’t saw anything specific related to that in the documentation).


Had to leave service shutdown for 40min and let the autovacuum process ends. Then I applied the VACUUM FULL ANALYZE; on the database and the db size is now 1.8 GB.
For now I don’t see anymore autovacuum stuck.

1 Like

Well, the solution I marked isn’t really a solution. This problem get’s back as bumerang. After a week or so we have the same problem … PSQL stuck at 20-30% cpu usage and we have constant running/ending autovacuum process on sonarqube database…

Anyone else have the same issue>?

Made some analysis and it looks like the autovacuum runs ends and not doing anything. Even by trying to VACUUM VERBOSE one of the biggest tables which is live_measures; end up with
tuples: 0 removed, 1682561 remain, 564524 are dead but not yet removable

I observed only when I shutdown SQ it’s vacuuming those… with running SQ connected to the DB there is now way to clean this mess up – is this a bug??

In case you had similar problem then me I found a root cause.
With the latest upgrade to 10.4 we added recommended settings for the jdbc connection from this page:

This was somehow leading to a problem when vacuum was not able to complete.
After removing those custom values we are again back to normal with the dead tuples on the largest tables, and we can vacuum when SQ is up and running.

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