You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to handle Keycloak connections during PostgreSQL restart
#45145
We are running Keycloak-Instances on Kubernetes (1.33 with Talos) using the Keycloak-Operator (26.4.7) paired with PostgreSQL-Clusters (3 Replicas) using CloudNative-PG-Operator (1.27.1).
If we need to restart the primary replica of the postgresql-cluster (e.g. due to node-maintancen, upgrades, ...) we often face the scenario, that the postgresql-replica stays in "Terminating" state for quite a long time because Keycloak keeps the connections open.
What is the proper way to speed up that process? I am aware that i could change the default smartShutdownTimeout from 180 seconds to 20 for example to tear down the connections quicker. But I am not sure if that's the best idea.
Is there no mechanism or message to tell Keycloak to close its sessions? It would be very helpful if someone could point me in the right direction to implement that properly.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Hi there
We are running Keycloak-Instances on Kubernetes (1.33 with Talos) using the Keycloak-Operator (26.4.7) paired with PostgreSQL-Clusters (3 Replicas) using CloudNative-PG-Operator (1.27.1).
If we need to restart the primary replica of the postgresql-cluster (e.g. due to node-maintancen, upgrades, ...) we often face the scenario, that the postgresql-replica stays in "Terminating" state for quite a long time because Keycloak keeps the connections open.
What is the proper way to speed up that process? I am aware that i could change the default
smartShutdownTimeoutfrom180seconds to20for example to tear down the connections quicker. But I am not sure if that's the best idea.Is there no mechanism or message to tell Keycloak to close its sessions? It would be very helpful if someone could point me in the right direction to implement that properly.
Thanks for you replies!
All reactions