You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 14, 2024. It is now read-only.
We have been getting a Reconnect error with idle clients.
We do have reconnect: true but it only appears to reconnect after the bind or search fails which then means we need to build our own custom retry logic for the bind and search.
In general, is it advisable to use one LDAP client for all binds and searches or a new LDAP client for each bind? We are trying to decide on the best approach. We don't want to make a lot of LDAP clients that are sitting idle after they are finished being used. What would be a good way to close these connections when they are no longer needed?
The text was updated successfully, but these errors were encountered:
@jsumners we also were wondering if it's necessary to create a new ldap client for each and every request. We finally decided to create just a single client instance and pass those instance to several sub functions which call bind() unbind() for each search request
client = ldap.createClient()
bind(), search(groupFilter), unbind() -> in order to get a large list of groups
For all members of those groups, we asynchronously send further search requests (via promise + throtteling) in order to fetch all member detail information: bind() search(userFiler) unbind()
process.exit()
We talk about 2000-3000 members here. We use the same client for all requests. So far it works, but when using fast throtteling settings and/or large ldapjs timeout settings (like e.g. 20000 ms) we experience a lot of unsolicited erros like [02:07:39.620] ERROR (ldap-client/13296): unsolicited message and also errors like ConnectionError: 24__ldaps://my.server.intern:3070 closed
As a workaround we also use own retry code (using npm retry package). But the behaviour is strange.
Also tried to listen to various events: http://ldapjs.org/client.html#client-events, but it seems that events like res.on('timeout' err =>etc.) are not possible ? res.on('error') works, though.
We have been getting a Reconnect error with idle clients.
We do have
reconnect: true
but it only appears to reconnect after the bind or search fails which then means we need to build our own custom retry logic for the bind and search.In general, is it advisable to use one LDAP client for all binds and searches or a new LDAP client for each bind? We are trying to decide on the best approach. We don't want to make a lot of LDAP clients that are sitting idle after they are finished being used. What would be a good way to close these connections when they are no longer needed?
The text was updated successfully, but these errors were encountered: