Configuring the LDAP Connection Pool
Use system properties instead of updating the settings in the application
Because of a bug, the ‘Update Settings’ form used to specify the LDAP connection pool properties directly in the application won’t work. Any values that you set will not have any effect. Use this page to configure the connection pool using system properties instead.
Configure the LDAP connection pool
To configure the JNDI connection pool:
Go to
<installation-directory>/bin
, and edit thesetenv.sh
(Linux) orsetenv.bat
(Windows) file.Set the properties from the table below, for example:
-Dcom.sun.jndi.ldap.connect.pool.initsize=2 -Dcom.sun.jndi.ldap.connect.pool.prefsize=1 -Dcom.sun.jndi.ldap.connect.pool.maxsize=20
Related pages:
To configure your LDAP connection pool:
- Choose the cog icon , then choose General Configuration
- Click 'User Directories' in the left-hand panel.
- Click 'LDAP Connection Pool Configuration' in the 'Additional Configuration' section.
Pool properties
Setting | System property | Description | Default value |
---|---|---|---|
Initial pool size | com.sun.jndi.ldap.connect.pool.initsize | The number of LDAP connections created when initially connecting to the pool. | 1 |
Preferred pool size | com.sun.jndi.ldap.connect.pool.prefsize | The optimal pool size. LDAP will remove idle connections when the number of connections grows larger than this value. A value of 0 (zero) means that there is no preferred size, so the number of idle connections is unlimited. | 10 |
Maximum pool size | com.sun.jndi.ldap.connect.pool.maxsize | The max number of connections. When the number of connections reaches this value, LDAP will refuse further connections. As a result, requests made by an application to the LDAP server will be blocked. A value of 0 (zero) means that the number of connections is unlimited. | 0 |
Pool timeout | com.sun.jndi.ldap.connect.pool.timeout | The length of time, in milliseconds, that a connection may remain idle before being removed from the pool. When the application is finished with a pooled connection, the connection is marked as idle, waiting to be reused. A value of 0 (zero) means that the idle time is unlimited, so connections will never be timed out. | 30000 |
Pool protocol | com.sun.jndi.ldap.connect.pool.protocol | Only these protocol types are allowed to connect to LDAP. If you want to allow multiple protocols, enter the values separated by a space. Valid values are:
|
|
Pool authentication | com.sun.jndi.ldap.connect.pool.authentication | Only these authentication types are allowed to connect to LDAP. If you want to allow multiple authentication types, enter the values separated by a space. See RFC 2829 for details of LDAP authentication methods. Valid values are:
|
|
Notes:
- The connection pool settings are system wide and will be used to create a new connection pool for every configured LDAP directory server.
- You must restart your application server for these settings to take effect.