{"id":27920,"library":"ldappool","title":"LDAP Pool","description":"A simple connector pool for python-ldap. Current version 3.0.0 (released 2021). Provides a pool of LDAP connections to reuse, reducing overhead of creating new connections. Stable release cadence, maintenance mode.","status":"maintenance","version":"3.0.0","language":"python","source_language":"en","source_url":"https://github.com/mozilla/ldappool","tags":["ldap","connection-pool","python-ldap"],"install":[{"cmd":"pip install ldappool","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Core dependency for LDAP operations","package":"python-ldap","optional":false}],"imports":[{"note":"","wrong":null,"symbol":"ConnectionManager","correct":"from ldappool import ConnectionManager"}],"quickstart":{"code":"from ldappool import ConnectionManager\n\nmanager = ConnectionManager(\n    uri='ldap://ldap.example.com',\n    binddn='cn=admin,dc=example,dc=com',\n    password='secret',\n    size=10\n)\nconn = manager.get_connection()\n# use conn (python-ldap connection)\nprint(conn.search_s('dc=example,dc=com', 2, '(objectClass=*)', ['dn']))\nconn.reset()  # return to pool","lang":"python","description":"Create a pool and get a connection. Connection object is a python-ldap connection with reset() method to return to pool."},"warnings":[{"fix":"Always call conn.reset() or use context manager (with manager.connection() as conn:).","message":"Connections obtained from pool MUST be returned via .reset() or they will be leaked and eventually exhausted.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from ldappool import ConnectionManager' instead.","message":"In version 3.0.0, the 'pool' module was removed; imports from ldappool.pool will fail.","severity":"breaking","affected_versions":"2.x -> 3.0.0"},{"fix":"Set strategy='round_robin' instead of round_robin=True.","message":"The 'ldappool.ConnectionManager' constructor argument 'round_robin' is deprecated. Use 'strategy' instead.","severity":"deprecated","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Use 'from ldappool import ConnectionManager' directly.","cause":"The pool module was removed in version 3.0.0.","error":"ModuleNotFoundError: No module named 'ldappool.pool'"},{"fix":"Verify ldap:// URI and network connectivity. Check if server allows anonymous binds if binddn/password not provided.","cause":"LDAP server unreachable or incorrect URI.","error":"ldappool.errors.ConnectorError: 'No server available'"},{"fix":"Increase pool size, ensure connections are reset properly, or set max_size=0 for unlimited pool.","cause":"All connections in pool are in use and pool is not set to unbounded (max_size=0).","error":"ldappool.errors.ConnectorError: 'Pool exhausted'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}