Skip to content
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

deleting an LDAP user takes several minutes when jsxc.nextcloud is active #91

Closed
DanScharon opened this issue Feb 19, 2018 · 2 comments · Fixed by #95
Closed

deleting an LDAP user takes several minutes when jsxc.nextcloud is active #91

DanScharon opened this issue Feb 19, 2018 · 2 comments · Fixed by #95

Comments

@DanScharon
Copy link
Contributor

jsxc.nextcloud: 3.3.2

Expected behaviour

When I delete a user from LDAP which isn't in LDAP anymore with occ user:delete <user> it should only take a couple of seconds.

Actual behaviour

When jsxc.nextcloud is active, deleting such a user takes several minutes.
These are the SQL queries that the SQL server is receiving during that time:

SELECT "appid", "configkey", "configvalue" FROM "oc_preferences" WHERE "userid" = $1
SELECT "ldap_dn" FROM "oc_ldap_user_mapping" WHERE "owncloud_name" = $1
INSERT INTO "oc_ojsxc_stanzas" ("to", "from", "stanza") VALUES($1,$2,$3)

It looks like although I am using an external XMPP server, JSXC is trying to keep the rosters for its internal server up to date after a user removal.

As a result it took up to 9 minutes to delete a user from (an admittedly large) LDAP.

@sualko
Copy link
Member

sualko commented Feb 20, 2018

@LEDfan two questions:

  • can we safely disable all hooks if the internal backend is not used?
  • why is there a roster push for all users? It should be enough for users who are online.

@sualko sualko added the bug label Feb 20, 2018
@LEDfan
Copy link
Member

LEDfan commented Feb 20, 2018

@DanScharon thanks for reporting, it's a bit silly I didn't think of this earlier.

can we safely disable all hooks if the internal backend is not used?

Yes 😃

why is there a roster push for all users? It should be enough for users who are online.

Because when a user is offline (i.e. there is no browser window open) the roster is still cached in the localStorage of users, when they open JSXC again the roster is loaded from localStorage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants