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
LDAP resolver connection pool does not have a pool size or pool lifetime #3633
Comments
I actually made a mistake on pinpointing where the problem is. The ServerPool works correctly in the LDAPIdResolver and What really happens is that the The reason for that is that If we add a few debugging prints in the relevant code we get the following results for every access to the
Importing |
Just to add a few actual statistics to illustrate the problem and the fix. Using
|
Fixing the Connection Pool actually exposed another problem: The With our fix, if we tried restarting the LDAP server, privacyIDEA permanently lost its LDAP connections. The fix for that is to change the ldap3 |
@kkalev Are you using nginx or apache? |
Evaluate if this is easily possible with ldap3. |
So i took a closer look at this and we don't want the resolver object in the |
Top-level intent
Steps to reproduce
Expected outcome
The LDAP resolver connection pool should be of a maximum size and close connections after some level of inactivity or total time
Code Problem
The problem is that the
create_connection()
method in LdapIdResolver.py calls the ldap3Connection()
class constructor method without setting any values for thepool_size
andpool_lifetime
parameters which, if not set, take the value ofNone
.The LDAP resolver should allow the administrator to set these variables through the admin interface (or at least as general parameters in the
pi.cfg
configuration file).Thank you for a very helpful product.
The text was updated successfully, but these errors were encountered: