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

QuarkusKeycloakSession kept in memory for each timer [GHI#43761]

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

      core

      Describe the bug

      When creating a timer, an instance of the KeycloakSession is kept in memory.

      The code only needs the sessionFactory, so this should be avoided.

      Version

      main

      Regression

      [ ] The issue is a regression

      Expected behavior

      Don't keep the session, instead keep the sessionFactory

      Actual behavior

      A session is kept, and never used. It is also problematic as that session is then later already closed and/or stale.

      How to Reproduce?

      Start up Keycloak, and create a heap dump. Look for QuarkusKeycloakSession instances and where they are retained.

      Anything else?

      I'll prepare a PR

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

                Created:
                Updated:
                Resolved: