REST API Delete User is really slow

We have about 9k users of the system. Updating chat rooms and users through the API has always been slow, but recently its gotten to the point where it take about a minute for one user delete request to finish.

We are on version 4.0.2, using the current REST API plugin. We setup a test site and pointed it at a copy of the production database. This test site suffers from the same issue. We updated the test site to the latest version 4.2.3 but that did not correct the issue.

We are using MySQL as the back end. We ran profiler during a test delete request, and it seems that the database delete is almost instant, but the API takes a long time to respond to the request.

Other API calls all seem to be quick, its just the delete user for some reason. Also deleting users through the admin console is quick.

Any suggestions on how to correct this issue would be appreciated. We are at a loss for what to do next.

1 Like

Are you using clustering?

Hi Daryl,

No we are not clustering. We have one VM running Windows Server 2012 R2, 8GB of ram and 4 cores.

Both the OpenFire service and the MySQL database are running on this VM.

A post was split to a new topic: Deleting users in Admin Console in cluster is slow

This was a caching issue. I added this system property and it corrected the issue.

cache.username2roster.size = -1

Here is a post that helped: