[keycloak-user] Migrations taking very long

Gregor Tudan Gregor.Tudan at cofinpro.de
Thu May 9 03:23:28 EDT 2019


Hi,

We run Keycloak with a lot of realms (~400). The last update from 4.4 to 4.8 took around 3h on our test environments, and most of this was due to the migrations for client scopes.
https://github.com/keycloak/keycloak/blob/master/server-spi-private/src/main/java/org/keycloak/migration/migrators/MigrateTo4_6_0.java

Such long downtimes are a problem to us, and make it hard for us to convince everyone to do those upgrades regular. Does someone know a way to shorten them, i.e. by running those migrations after the server started?
The manual migration strategy for JPA looked promising (https://www.keycloak.org/docs/latest/server_installation/index.html#database-configuration), but doesn’t apply to the Java migrations.

Thanks,
Gregor


More information about the keycloak-user mailing list