[keycloak-user] how to clean-up OFFLINE_CLIENT_SESSION, OFFLINE_USER_SESSION tables

Marek Posolda mposolda at redhat.com
Fri Nov 25 04:20:18 EST 2016

It seems you are using offline tokens for some of your application 
right? There is periodic cleaner, which will remove the records from the 
expired offline sessions. But timeout for the offline sessions is 30 
days by default. Also the time of "last refresh" is currently updated in 
DB every time when you restart the server (in case that you have 
single-server without cluster).

In other words, if you restart the server at least once every 30 days, 
the table will keep growing. It is probably something we can improve... 
Feel free to create JIRA.

Until that, your possibilities are:
- Decrease the timeout to shorter value than 30 days (can be done in 
admin console)
- Ensure the server is not restarted within 30 days, so the outdated 
sessions can be cleared.
- Use cluster with 2 nodes or more and ensure that at least 1 node is 
always online.


On 24/11/16 20:11, i.pop at centurylink.net wrote:
> Hi,
> Working with a domain clustered mode and shared ORACLE db , I am noticing {OFFLINE_CLIENT_SESSION, OFFLINE_USER_SESSION} tables keep growing in size. How these tables get cleaned up?
> Thanks,
> Ioan
> _______________________________________________
> keycloak-user mailing list
> keycloak-user at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/keycloak-user

More information about the keycloak-user mailing list