SOP-KCS-01: Script to clear off unwanted keycloak abis-client sessions
Description
We have observed that in some ABIS implementations for every insert request a session is created for every insert request. Hence, in a day if an ABIS is processing nearly 200K packets, it creates around 200k mosip-abis-client sessions in Keycloak for the MOSIP realm.
And we have observed that if the number of sessions increases by more than 100K, the keycloak cloak if not allocated memory properly crashes. Hence, we have prepared a script to clear up sessions for mosip-abis-client. This script can be run at regular intervals to clear off excess sessions.
Steps
Login to keycloak and verify the number of active sessions for keycloak.
If the number of sessions is more than 30K execute the script in the link shared.
https://github.com/mosip/mosip-infra/tree/1.2.0_v3/deployment/v3/utils/keycloak
Please follow the readme and use the client sessions logout script to clear the sessions.