[keycloak-user] Keycloak, OutOfMemoryError

Lars Martin Kristensen larsmak at gmail.com
Mon Feb 19 05:28:36 EST 2018


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


More information about the keycloak-user mailing list