SonarQube 6.7.5 LTS Enterprise to 7.9.1 LTS Enterprise database migration taking Forever

I upgraded my Postgresql database from 9.2 to 10.1 and started my SQ 7.9.1 LTS. My database upgrade from 6.7.5 V to 7.9.1 V started 14 hours ago but still not completed.

FYI, My Project_measures table rows are 36 million

Upgrade Log:
2020.01.10 17:41:05 INFO web[o.s.s.p.d.m.s.MassUpdate] 1469 snapshots processed (0 items/sec)
2020.01.10 17:42:05 INFO web[o.s.s.p.d.m.s.MassUpdate] 1471 snapshots processed (0 items/sec)
2020.01.10 17:43:05 INFO web[o.s.s.p.d.m.s.MassUpdate] 1474 snapshots processed (0 items/sec)
2020.01.10 17:44:05 INFO web[o.s.s.p.d.m.s.MassUpdate] 1477 snapshots processed (0 items/sec)

36 millions record is sure a lot, but the speed you are experiencing is indeed far bellow what we should expect. Did you perform a VACUUM operation before running the migration ? Do you have plenty of available space remaining on your database ? what is your database hardware specification ? What is the latency between SQ and your database ?

Guillot, Thanks for responding.

  1. I haven’t perform any VACUUM operation on my Postgresql database before migration. But We did following operations;
    a. Optimized database on MySQL using SQL query.
    b. Migrated MySQL database to Postgresql 9.2 using SonarQube MySQL Migrator Tool.
    c. Spinup Sonarqube 6.7.5 on Postgresql 9.2 and tested.
    d. Stopped SQ 6.7.5 and Upgraded Postgresql database from 9.2 to 10.1 V
    e. started SQ 7.9.1 on Postgresql 10.1V
    f. Started db migration using SonarQube UI :900/setup (Database migration is running. since last 3 days)
  2. Yes I have plenty of space on my database
    3.database hardware specification : AWS RDS Postgresql
    vCPU 2
    RAM 8 GB
    Storage: 50 GiB (Our Database size is 19 GB)
  3. Our Sonarqube and database are on same AWS

image

Running a vaccum full before starting the migration may help. Do you got Performance Insights enabled on your database ? anything relevant here ?

Thanks for letting me know. After “vaccum full” on my Postgresql database Upgrade went well. (Upgrade setup databse took 70 min for my 18 GB of the database)

2 Likes