[keycloak-user] Shared datastore?

Nicolas Ocquidant nocquidant at gmail.com
Wed Nov 7 12:17:34 EST 2018


Hi,

According to Infinispan, when passivation is disabled, every update to the
cache should always write to the store.

But I can't manage to get it work with Keycloak. If I disable passivation,
my SQL store (Postgres) stays empty, even if the cache is full.

So, if passivation is needed for Keycloak to write to the DB, it means that
the use of a shared DB is not possible...

But this leads to another issue for me. Enable passivation without a shared
DB seems to imply that either 'fetch-state' or 'purge' should be enabled on
startup, in order for the cache to not contain stale entries.

15:27:44,626 WARN
[org.infinispan.configuration.cache.AbstractStoreConfigurationBuilder] (MSC
service thread 1-6) ISPN000149: Fetch persistent state and purge on startup
are both disabled, cache may contain stale entries on startup

As I need to keep millions of sessions, this will considerably slow down
the startup of my node (when started again after a crash for instance).

So, is shared datastore allowed in Keycloak? If yes, how to enable it?
Otherwise what other options do I have to improve my startup time, if
millions of sessions are in the store?

Thanks
--nick


More information about the keycloak-user mailing list