Configuring the JNDI LDAP connection pool
This page describes the site-wide settings for LDAP connection pooling in Confluence on a supported JDK.
View the current configuration
To view the JNDI LDAP connection pool:
- Go to Administration > General Configuration.
- Select User Directories from the side menu.
- Under Additional Configuration & Troubleshooting, select the link to LDAP Connection Pool Configuration.
Configure the JNDI LDAP connection pool
Use system properties instead of configuring settings in the user interface
Because of a known bug, the 'JNDI LDAP Connection Pool Settings' form won't work. Any values you set using the form won't have any effect. We've provided instructions on this page to configure the connection pool using system properties instead.
To configure the JNDI connection pool:
- Go to
<installation-directory>/bin
, and edit thesetenv.sh
(Linux) orsetenv.bat
(Windows) file. Set the properties using 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
- Restart your application server for the settings to take effect.
Pool properties
These connection pool settings are global (site-wide) and will be used to create a new connection pool for every configured LDAP directory server.
Learn more about configuring system properties
Connection Pool Setting | System property | Description | Default Value |
---|---|---|---|
Initial Pool Size | com.sun.jndi.ldap. | The number of LDAP connections created when initially connecting to the pool. |
|
Preferred Pool Size | com.sun.jndi.ldap. | The optimal pool size. LDAP will remove idle connections when the number of connections grows larger than this value. A value of |
|
Maximum Pool Size | com.sun.jndi.ldap. | The maximum 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 |
|
Pool Timeout | com.sun.jndi.ldap. | The length of time, in seconds, 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 |
|
Pool Protocol | com.sun.jndi.ldap. | 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. | 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:
|
|