[keycloak-user] Keycloak + Infinispan Passivation Failure

Coe, Matthew mcoe at ebay.ca
Tue Feb 12 16:02:28 EST 2019


Hello!

I’m attempting to configure a cluster of standalone Keycloak 4.7.0.Final instances to have their Infinispan data persisted. I’m using JDBCPING to create the cluster, and our user load is great enough that we don’t want to keep all our sessions in memory.

I’ve configured the “sessions” cache as follows:

<distributed-cache name="sessions" statistics-enabled="true">
    <state-transfer timeout="600000" />
    <object-memory size="2"/>
    <jdbc-store data-source="KeycloakDS" passivation="true" dialect="MYSQL" purge="false" shared="true">
        <table>
            <id-column type="VARCHAR(255)"/>
            <data-column type="BLOB" name="data"/>
            <timestamp-column type="BIGINT(20)" name="timestamp"/>
        </table>
    </jdbc-store>
</distributed-cache>

The object-memory size is selected purely for testing purposes, so that I can quickly hit a point where data will need to be evicted from Infinispan.

The problem I’m running into is that data is only persisted to MySQL is passivation is on, where it exhibits the predictable passivation behaviour. When I turn passivation to false, instead of acting as a write-through cache, will all data persisted, no data is persisted at all. Once I fill the object-memory size, sessions start getting dropped behind the scenes.

Is this pilot error? Or have I found a bug in Infinispan? DEBUG-level logging doesn’t reveal any complaints from the underlying systems.

Thanks!

Matthew G P Coe

Platform Software Developer


T 416.969.2365

M 416.427.7315

E mcoe at ebay.com

A 500 King Street West, Unit 200, M5V 1L8, Toronto, ON



[Kijiji]











-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 4295 bytes
Desc: image001.png
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20190212/7d9ced7b/attachment-0001.png 


More information about the keycloak-user mailing list