Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would expect the default values of the container to allow Keycloak to run?
If we have a problem there, we should probably report it to the Keycloak team?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These values allow keycloak to run, but it may consume to much memory.
I presume, that they use defaults, which are good for their intended use case (long running containers with many connections), but are not optimal for devmode use case (containers are being spin up often, but for short time and with a single local client)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gsmet FYI, please see #41426, feedback from the Keycloak team is that the new GC policy is now used in Keycloak 25, with the advice being to set the limits at the (Quarkus) KC devservice level but that is hard to do right without impacting some systems. These suggested default properties are the ones which were used in KC 24 and they worked for all type of systems
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder, instead of trying to deal with all of these advanced memory management properties by default, should we document that you may have to set these or those properties in memory constrained environments ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sberyozkin what are the downsides of implementing this change?
As I see it, it makes life easier for some of our users and doesn't make things worse for anybody. Putting this into documentation means, that some of the users have to do it themselves and spend more time and effort. Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fedinskiy Sorry for the delay, I'm a little bit concerned that we'll put the properties and miss out on whatever happens in Keycloak around the GC management going forward, which may for example benefit unconstrained systems. My understanding that the problem happens only on the QE system so far.
But, it would make sense IMHO to see if trying to control the limits explicitly can work and what difference it can make. Can you please ping @mabartos for the extra guidance and try to find the HEAP limits for this system as suggested at https://www.keycloak.org/server/containers#_specifying_different_memory_settings ?
Have a look please in the next week or so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've created a new PR for this with all the explanations: #43601
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mabartos