Uploaded image for project: 'Red Hat build of Keycloak'
  1. Red Hat build of Keycloak
  2. RHBK-4010

QuarkusKeycloakSession not garbage collected when running Liquibase [GHI#43759]

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False

      Before reporting an issue

      [x] I have read and understood the above terms for submitting issues, and I understand that my issue may be closed without action if I do not follow them.

      Area

      dist/quarkus

      Describe the bug

      When Keycloak performs the Liquibase upgrade, it misses to clear a thread local context, so the session is never garbage collected.

      As this is an effort to find all those places, this is a housekeeping task. It will reduce the memory usage of Keycloak slightly in this place, and to a larger extent in other places.

      Version

      main

      Regression

      [ ] The issue is a regression

      Expected behavior

      Thread locals should be removed when no longer used.

      Actual behavior

      The thread local is kept

      How to Reproduce?

      Start up Keycloak, create a memory dump, and search for QuarkusKeycloakSession

      Anything else?

      I'll create a PR.

              Unassigned Unassigned
              pvlha Pavel Vlha
              Keycloak SRE
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: