Skip to content

QuarkusKeycloakSession kept in memory for each timer #43761

@ahus1

Description

@ahus1

Before reporting an issue

  • 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

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions