SonarQube DB migration from 5.6.7 to 6.7.4 is taking forever

We are trying to update SonarQube from 5.6.7 to 6.7.4 and we are at the DB migration step.
It has been running for more than 5 hours and the DB migration is still running.
I would like to know if this is a normal behavior since I did not see it take this long when we upgraded SonarQube from 5.1 to 5.6.7 ?

Thanks !


Could you please share the web.log content ?

Julien Lancelot

I am running into the same issue migration had been running since 3+ hours and its stuck at
2020.06.05 09:01:26 INFO web[o.s.s.p.d.m.DatabaseMigrationImpl] Starting DB Migration and container restart
2020.06.05 09:01:26 INFO web[DbMigrations] Executing DB migrations…
2020.06.05 09:01:26 INFO web[DbMigrations] #1207 ‘Drop unused columns on PROJECT_MEASURES’…

Any help/advice will be appreciated



Which database are you using ?

This migration (from SonarQube 6.0) could take time if you have a lot of project measures.
It’s only goal is to drop the columns “rules_category_id”, “tendency”, “measure_date”, “url”, “rule_priority”, “characteristic_id”, “rule_id” from “project_measures” table.

I can recommend you to either :

  • Wait for more time for the SQL query to be completed
  • Try to manually drop the columns on your own to check how much time it can take (then rollback to previous database backup to be sure you are in the correct state)
  • Start from a new SonarQube 7.9.3 as it’s the latest LTS and the version you’re using is very old, and it will be hard to help you.


Hi @julienlancelot thanks project_measures db size is around 130GB, do you have any projection on how much time this could take.
| Table | Size in GB |
| project_measures | 130.24 |

Also yes plan is to upgrade to the latest version i.e 8.3.1 but for that I have go through migration hops/paths 5.6 --> SonarQube 6.7.7 —> SonarQube 7.9.3 LTS —> 8.3.1

I’m sorry I’ve no idea how much time it could take.

You can also try to delete some no more used projets where you are in 5.6.7, before the migration.