Get all users poor response time

Dear Keycloak community,

I am writing to seek your help regarding a performance issue I am experiencing when trying to retrieve all users from Keycloak. Currently, I am using Keycloak version 19.0.3 and a PostgreSQL database, but when I try to fetch 100 users, the response time ranges from 22 to 40 seconds, which is significantly slower than what I would expect. I am hoping that someone in the community can help me find a solution to improve the response time.

If anyone has experienced a similar issue or has any ideas on how to optimize the performance, I would greatly appreciate your input. Thank you in advance for your help!

Hi,

this is very much not expected. I’d check memory limits for the keycloak instance and for the postgres database.

Do your users have a large number of roles or groups associated?
And gets the response time faster, if you do repeated calls?

Most probably, that’s the root cause.

i have deleted the ldap provider i’m also getting a a slow response time when getting all users, what do u suggest me to do ?
to improve the response time any ideas ?