[keycloak-user] Keycloak, OutOfMemoryError

Ariel Carrera carreraariel at gmail.com
Mon Feb 19 17:02:39 EST 2018


Hi Lars maybe this a problem with provider but I believe that you need
first to try with a higher max memory value. 512Mb with 50k users sounds
not enough to keep data in cache and all programa data available... what
happens if you increase value to 768mb or 1024mb? Have you got changed
default infinispan values too? More data cached... more memory required..

El El lun, 19 feb. 2018 a las 07:29, Lars Martin Kristensen <
larsmak at gmail.com> escribió:

> Hi,
>
> We're seeing occasional starvation of our keycloak instance in one of our
> environment. The instance becomes unresponsive and the logs reveals that
> it's running out of heap space:
>
> 19:54:22,305 ERROR [io.undertow.request] (default task-22) UT005023:
> Exception handling request to
> /auth/realms/MyRealm/protocol/openid-connect/certs:
> java.lang.OutOfMemoryError: Java heap space
>
> We're running in standalone mode (single instasnce), and this is the only
> environment we're using the paypal identity provider. Could this be the
> problem? In the log, around the time of the OutOfMemoryErrors we have seen:
>
> 19:39:08,036 INFO  [org.apache.http.impl.execchain.RetryExec] (default
> task-21) Retrying request to {s}->https://api.paypal.com:443
> 19:40:36,330 INFO  [org.apache.http.impl.execchain.RetryExec] (default
> task-21) I/O exception (java.net.SocketException) caught when processing
> request to {s}->https://api.paypal.com:443: Connection reset
> 19:40:40,362 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper)
> ARJUNA012117: TransactionReaper::check timeout for TX
> 0:ffff6468b804:-2ac1cab1:5a1ee0de:5cda0d in state  RUN
> 19:40:37,591 INFO  [org.apache.http.impl.execchain.RetryExec] (default
> task-21) Retrying request to {s}->https://api.paypal.com:443
> 19:41:51,957 WARN  [com.arjuna.ats.arjuna] (Transaction Reaper)
> ARJUNA012117: TransactionReaper::check timeout for TX
> 0:ffff6468b804:-2ac1cab1:5a1ee0de:5cda0d in state  CANCEL
>
> ..but whether this is the cause or a consequence of the OutOfMemoryError
> I'm a little bit uncertain about.
> Are there perhaps any way to tune the paypal connection configuration so
> that connection errors consumes less resources?
>
> Users: Around 50k
> Keycloak-version: 3.4.0.Final
> Java-version: 3.4.0.Final
> Memory-settings: -Xms64m -Xmx512m -XX:MetaspaceSize=96M
> -XX:MaxMetaspaceSize=256m
>
> Any pointers would be greatly appreciated.
>
> Best Reagards,
> Lars Martin
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user
>
-- 
Ariel Carrera


More information about the keycloak-user mailing list