Memory issues after updating from version 10.0.2 to 15.0.2

610 views
Skip to first unread message

est...@pic.es

unread,
Nov 22, 2021, 4:34:09 AM11/22/21
to Keycloak User
Hello,

We have been running the Keycloak version 10.0.2 for 1 year without any relevant problem. 

Last September, we updated our Keycloak instance from version 10.0.2 to 15.0.2. 
After this update, we are observing that the keycloak process crashes due to a Java heap space error.

Oct 10 02:43:52 keycloak01 standalone.sh: #033[0m#033[31m02:43:52,157 ERROR [org.keycloak.services.error.KeycloakErrorHandler] (default task-613) Uncaught server error: java.lang.OutOfMemoryError: Java heap space

We were running the keycloak process with the default java options. However, after these problems we increased the following values and started to monitor them:

-   JAVA_OPTS="-Xms64m -Xmx512m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true"
+   JAVA_OPTS="-Xms256m -Xmx2048m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true"

After modifying the java options, we saw that the crush went from occurring every 10 days to 40 days.

Our Keycloak server is running in standalone mode in a VM with 4GB RAM. 

We relate these memory issues to the update because we had not experienced them before using the version 10.0.2. They started just 10 days after the update.

Has anyone else seen these problems?

Many thanks in advance,
Esther
heap.png
memory.png

Thomas Darimont

unread,
Nov 22, 2021, 6:15:05 AM11/22/21
to est...@pic.es, Keycloak User
Hello Ester,

did you adjust the infinispan configuration with the upgrade? AFAIR the keycloak developers had to explicitly configure a lifespan value for the distributed-cache expiration in order to get those cleaned up from time to time.

I'd recommend to compare the infinispan cache configuration with keycloak 15.0.2.

Cheers,
Thomas

--
You received this message because you are subscribed to the Google Groups "Keycloak User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to keycloak-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/keycloak-user/b41ca1f9-61ab-4bf7-870b-56d9a2e3a0e4n%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages