After upgrading from keycloak 1.9.8 to 3.3.0.Final I started noticing a substantial
performance issue on the /admin/realms/platform/users endpoint. I use this with an empty
search and typically grab 1000 users at a time. I am able to reproduce the issue as
follows:
1. Downloaded fresh copy of 3.3.0
2. Connect to empty postgres database (by following the documentation for adding the
postgres jar as a module and setting up datasource connection in standalone.xml)
3. Run in standalone mode
4. Create a new realm and add 1000 users
* I did this by using the admin-cli client and an admin user I created with
manage-users & manage-realms. Used bearer tokens to hit POST to endpoint to create
user.
5. Now I hit the /admin/realms/platform/users endpoint with a bearer token from the
admin-cli client
The call takes 30 seconds to return!! And this is with everything on my local machine.
I can verify that if I do the same process with with keycloak 1.9.8 the same call takes
just about 1 second
What has caused the difference between 30 seconds and 1 second for the same call? Is there
something I need to set up differently in version 3.3.0?
As a side note, I tried paging the calls 100 at a time on keycloak 3.3.0 as well. Going
this route on my local machine takes a sum total of about 13 seconds to get all 1000 users
of ten calls. 13 seconds is a pretty long time for just 1000 users.
--
David Hartfield
Software Architect | EdLogics
david.hartfield@edlogics.com<mailto:chris.savory@edlogics.com>
www.edlogics.com<http://www.edlogics.com/>
[cid:image001.png@01D36CF2.2757B060]<http://www.edlogics.com/>
[cid:image002.png@01D36CF2.2757B060]<https://www.linkedin.com/company/edlogics>[cid:image003.png@01D36CF2.2757B060]<https://twitter.com/EdLogics>