Keycloak 16.1.1 add env variable without restarting

Dear All,

I’m using keycloak 16.1.1 in dockers. we have two separate servers and we hare facing token invalid once server restart. After doing research we found the solution for that. Since we have 100k user base we like to apply those env variables without restarting both keycloak due to users logout.

Those are the env variables we need to add our production env

CACHE_OWNERS_COUNT=2
CACHE_OWNERS_AUTH_SESSIONS_COUNT=2
JGROUPS_DISCOVERY_PROTOCOL=JDBC_PING
JGROUPS_DISCOVERY_PROPERTIES="datasource_jndi_name=java:jboss/datasources/KeycloakDS

I’m looking for advice, how to do it using CMD or cil.

Thank you.

1 Like