-
Notifications
You must be signed in to change notification settings - Fork 6.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Listing of sessions is very slow when we have tens of thousands sessions (+ not able to know the exact number of sessions) #29294
Comments
I am not sure about the I see that |
Due to the amount of issues reported by the community we are not able to prioritise resolving this issue at the moment. If you are affected by this issue, upvote it by adding a 👍 to the description. We would also welcome a contribution to fix the issue. |
Thank you for reporting this issue. The issue is there for quite some time and as Alexander mentions it should be improved by durable sessions feature that crossdc team is working on. Therefore we don't assign a high priority to this issue at this moment. |
I've tested with the latest version of the persistent sessions feature available as part of #28265 in the upcoming KC25 release. I created 35000 sessions across 10000 different clients, and the list of sessions for a realm in the UI updated within less than 3 seconds for the first 10 pages. The more you paginate, the slower it will be. To get the total number of sessions, this can be retrieved via the CLI as follows and it will get the number of sessions per client:
In the example I used, this too about 30 seconds, mostly due to the number of clients involved as Keycloak validates each one of them and they didn't fit all into memory for me. For a smaller number of clients or an enlarged cache this shouldn't be an issue. I tried the same with only 10 clients and 10 users, and again 30000 sessions, and there the responses where a lot faster (less than a second when listing the first page of users, and less than two seconds when using the admin CLI to retrieve the number of sessions) With the main performance issue resolved, I consider this resolved. If you want to show the number of sessions in the UI, please create an enhancement issue as this is not a bug. |
Before reporting an issue
Area
admin/ui
Describe the bug
When we have tens of thousands of active sessions for a realm. Displaying the sessions is very very slow.
Currently we have about 30k sessions. Going in th Sessions tab of the realm, it takes 40 seconds (spinner displayed) before showing the first 10 sessions.
Note that it would be nice if the UI could display the number of sessions. Currently it is impossible to know it (without manually querying the DB).
Version
24.0.3
Regression
Expected behavior
Sessions screen should load faster when having many sessions
Actual behavior
Sessions screen is too slow
How to Reproduce?
Call the token endpoint to generate new tokens in a a loop in order to simulate many sessions
Anything else?
No response
The text was updated successfully, but these errors were encountered: