Try adding this to the config or upgrade to Keycloak version 16.1.1 or later:
<expiration lifespan="900000000000000000"/>
In our case even with this settings enabled we sometimes see OutOfMemory: Java heap space issues. We are using distributed-cache between multiple nodes of Keycloak. So most probably xmx settings also needs to be updated in case you have high load.