[keycloak-user] Poor performance on /admin/realms/platform/users

David Hartfield david.hartfield at edlogics.com
Mon Dec 4 11:22:23 EST 2017


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 at edlogics.com<mailto:chris.savory at edlogics.com>
www.edlogics.com<http://www.edlogics.com/>

[cid:image001.png at 01D36CF2.2757B060]<http://www.edlogics.com/>
[cid:image002.png at 01D36CF2.2757B060]<https://www.linkedin.com/company/edlogics>[cid:image003.png at 01D36CF2.2757B060]<https://twitter.com/EdLogics>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 5549 bytes
Desc: image001.png
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20171204/1799be66/attachment-0003.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1333 bytes
Desc: image002.png
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20171204/1799be66/attachment-0004.png 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1322 bytes
Desc: image003.png
Url : http://lists.jboss.org/pipermail/keycloak-user/attachments/20171204/1799be66/attachment-0005.png 


More information about the keycloak-user mailing list