-
Notifications
You must be signed in to change notification settings - Fork 39
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 processing on a remote server #102
Comments
I guess that ms directory searcher cached connection. |
Ah, are you saying the connection is closed each time even in the third button scenario? |
I think that AD server has limit allowed connections. And in all examples you created new connection. Try to reuse your connection and check performance again |
It's better but it's still happening. This is the new code here:
|
Looks like its server issue. Try check performance on server side. Maybe some replication issue or not optimized query. |
This is a test server that I just spun up last week on it's own domain and the only server / computer on that domain... No repllications, no additional domain controllers; just this server. |
I have kinda the same problem and I used System.DirectoryServices it was so fast. |
I'm working on migrating code over to your library because of the async methods. In MSAD I opened the connection and maintained that throughout the processing because of the time it took to initiate the connection. But this doesn't seem to have any affect in processing with your library. I created two button methods to initiate the async. One is to my domain in which my dev computer is connected to, the other is to a domain controller on the same network, but the computer is not joined to the domain.
When I hit the first button I get the response:
Connect 00:00:00.0091144
Bind 00:00:00.0277939
Pull Entries 00:00:00.3237716
and subsequent hits are very similar in time.
For the second button (to the domain not authenticated by the computer but on the SAME network) I get this:
Connect 00:00:00.0002284
Bind 00:00:00.0101008
Pull Entries 00:00:06.3929474
The time is between 5-7 seconds on each hit which makes this too slow to use.
I then created a third button to try to keep the connection open using this:
Clicking the button the first time I get:
Connect 00:00:00.0081138
Bind 00:00:00.0294921
Pull Entries 00:00:05.0790592
subsequent responses I get something similar to this:
Pull Entries 00:00:05.0610168
I see there is a feature request for connection pooling, but with what I'm seeing here I'm not sure that would fix anything...? Is there a way I can speed up these requests?
MSAD, winform (for quick testing), library 2.7.11
UPDATE:
In playing with this some more, it appears the directory searcher itself is much slower. I played with modifying an account and if I know the DN or SID it's fast:
Connect 00:00:00.0079363
Bind 00:00:00.0278668
Modify Entry 00:00:00.0144028
While not ideal, I can make this work for about 90% of cases by caching the SID on the account. But when processing a new account to see if it exists before trying to create, this will still create an issue...
Using's MS's directory searcher is fast, but it's not async.
The text was updated successfully, but these errors were encountered: