Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#52225·keycloak

migration to 26.7.x with all realms in single transaction

Author: sburkyCreated Aug 31, 2026Updated Sep 17, 2026
Labelskind/enhancementstatus/triage

Description

When the KeyCloak instance has a large number of realms (1,875 realms and 13,612 users in my instance), the migration of the realms occurs in a single transaction and takes a very long time—3 hours and 45 minutes. I had to increase KC_TRANSACTION_DEFAULT_TIMEOUT to 4 hours in order to complete the migration. Idempotency is not guaranteed, and the migration restarts from the beginning when the pod is restarted.

Value Proposition

The schema has already been migrated, so there's no going back, => So, should we plan for one JTA transaction per realm to reduce the load on Hibernate?

Goals

reduce the load on Hibernate

Non-Goals

...

Discussion

No response

Notes

No response

Source: keycloak/keycloak

View original on GitHubView discussion on GitHub