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

slow ldap user search #912

Closed
jamoedv opened this issue Apr 22, 2020 · 10 comments · Fixed by #1038
Closed

slow ldap user search #912

jamoedv opened this issue Apr 22, 2020 · 10 comments · Fixed by #1038

Comments

@jamoedv
Copy link

jamoedv commented Apr 22, 2020

Hello,

when searching Users to invite, it takes very long to find a user. (up to 10 min)
The user search in the file sharing app works very fast. Any tip on what I could check ? We are connected to a AD with several thousand users.. but as I said only in the polls invitation it is very slow.

thank you.

@jamoedv jamoedv changed the title Ldap very slow slow ldap user search Apr 22, 2020
@dartcafe
Copy link
Collaborator

Interesting. I'd say 9 min are acceptable. But 10? 😁
To be serious. Seems, we have to refactor the sharing functions. maybe related to #881 or at least should be considered together.

@scroom, @herrmannsdorfer, @BurtGummer, @phimeas, @PpaiSanchez
As you seem to use (or did use) polls with LDAP: Do you recognize similar behavior?

@herrmannsdorfer
Copy link

No problems here (NC 18.0.4, polls 1.4.2). AD search delivers results within milliseconds. But our AD has < 1.000 usr. And NC usr subset is preselected by LDAP filter in settings.

Considering a large userbase on AD I would ask @blizzz for advice. He is working on LDAP optimizations eg nextcloud/server#19919.

@blizzz
Copy link
Member

blizzz commented Apr 23, 2020

I don't know what the Polls app is doing there, but it suppose it is also just calling the user manager. Hopefully not to fetch all users at once. That would be indeed something to improve here. Someone else shall shed more light there.

If this is all proper, then slow user search is a setup/config issue and rather to be followd up on in the forums, or with a subscription.

@jamoedv
Copy link
Author

jamoedv commented Apr 23, 2020 via email

@blizzz
Copy link
Member

blizzz commented Apr 23, 2020

If i try to invite users the search
iterates through all users until it finds the right one. During this search
it also tries to load and display the users foto.

Ah… yes. This does not scale with many users of course. Someone would need to adjust the polls app to do it differently.

@dartcafe
Copy link
Collaborator

Hopefully not to fetch all users at once.

I think, that this maybe an issue. As I said, the search needs an overwork.

@dartcafe
Copy link
Collaborator

dartcafe commented Jun 11, 2020

@jamoedv I want to get in this issue now and need some information.

During this search it also tries to load and display the users foto.

Polls does not try to load fotos from the users, but from the contacts. Can you verify this?
Did you connect the contacts app to the LDAP or have a big amount of contacts?

Polls does three searches

  • groups -> via groupManager
  • users -> via userManager
  • contacts -> via contactsManager

and it tries to identify, if an email address is entered.

@dartcafe
Copy link
Collaborator

When getting contacts, the systemaddressbook is skipped and only user's address books should be scanned. Maybe the LDAP is also delivered via the contactsManager and scanned. I removed the scanning of the photo from the vcard.

@dartcafe
Copy link
Collaborator

I hope, that helps. I cannot test this because I have no LDAP running.

Copy link

github-actions bot commented Jun 7, 2024

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants