Keycloak Dev services take more memory after bump to 25, is it expected and can something be done about it? #41426
Replies: 5 comments 11 replies
-
/cc @geoand (devservices), @pedroigor (keycloak), @sberyozkin (keycloak), @stuartwdouglas (devservices) |
Beta Was this translation helpful? Give feedback.
-
There used to be a disk based mapping supported in some earlier versions but it was discontinued. The current command to start it is Java options are also possible to pass to the container, so if necessary, we can set some by default. For ex, if Infinispan is used by default, may be a less memory consuming DB option can be tried ? |
Beta Was this translation helpful? Give feedback.
-
We changed the GC in 25. Possibly that's the reason. Are the dev services using container only? |
Beta Was this translation helpful? Give feedback.
-
@michalvavrik @sberyozkin Little context: Since Keycloak 24, the heap size is relatively determined based on the available container memory. The default setting is to use 70% of the whole container memory for the heap, so it is necessary to set the container limit. Did you set the limit? For more info, check this guide. You can assess the heap parameters or disable the functionality of the relative heap size by setting the env var The more disturbing aspect is that it tries to allocate ~4GB of memory, which is very high, and I'm curious what exactly is happening there. As you already used Keycloak 24, it should be more the case around different settings set in Keycloak 25, as @vmuzikar mentioned. It'd be good to have a heap dump and track the native memory (NMT). |
Beta Was this translation helpful? Give feedback.
-
Thank you everyone for answers. Just 2 things:
|
Beta Was this translation helpful? Give feedback.
-
After #41162 I have Quarkus Quickstarts modules
security-keycloak-authorization-quickstart
,security-openid-connect-quickstart
.security-openid-connect-client-quickstart
,security-openid-connect-web-authentication-quickstart
andsecurity-openid-connect-multi-tenancy-quickstart
failing in resource constrained environment.I get OOM:
After reading keycloak/keycloak#26661 and https://www.keycloak.org/server/configuration#_second_step_start_keycloak_using_optimized I am not able to determine whether something should be done or not.
Beta Was this translation helpful? Give feedback.
All reactions