You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Jan Sindberg <ja...@gmail.com> on 2016/02/11 13:01:22 UTC

ApacheDS ldap connection timeout

We have an application with a pool of ldap connections. When they have been
idle for some time it seems that the DS closes the connections. The next
person logging into our application in the morning then waits 5 minutes to
get through the ten connections in the pool before new connections is
created.

We guess that if we configure "testWhileIdle" and "
timeBetweenEvictionRunsMillis" it should activate the
LookupLdapConnectionValidator and reduce the issue.
What would be reasonable values for timeBetweenEvictionRunsMillis? - How
quick is ApacheDS to close connections?

Should we consider the other settings as well?
timeBetweenEvictionRunsMillis indicates how long the eviction thread should
sleep before "runs" of examining idle objects. When non-positive, no
eviction thread will be launched. The default setting for this parameter is
-1 (i.e., idle object eviction is disabled by default).
- minEvictableIdleTimeMillis specifies the minimum amount of time that an
object may sit idle in the pool before it is eligible for eviction due to
idle time. When non-positive, no object will be dropped from the pool due
to idle time alone. This setting has no effect unless
timeBetweenEvictionRunsMillis > 0. The default setting for this parameter
is 30 minutes.
- testWhileIdle indicates whether or not idle objects should be validated
using the factory's PoolableObjectFactory.validateObject(T) method. Objects
that fail to validate will be dropped from the pool. This setting has no
effect unless timeBetweenEvictionRunsMillis > 0. The default setting for
this parameter is false.
- softMinEvictableIdleTimeMillis specifies the minimum amount of time an
object may sit idle in the pool before it is eligible for eviction by the
idle object evictor (if any), with the extra condition that at least
"minIdle" object instances remain in the pool. When non-positive, no
objects will be evicted from the pool due to idle time alone. This setting
has no effect unless timeBetweenEvictionRunsMillis > 0. and it is
superceded by minEvictableIdleTimeMillis (that is, if
minEvictableIdleTimeMillis is positive, then softMinEvictableIdleTimeMillis
is ignored). The default setting for this parameter is -1 (disabled).
- numTestsPerEvictionRun determines the number of objects examined in each
run of the idle object evictor. This setting has no effect unless
timeBetweenEvictionRunsMillis > 0. The default setting for this parameter
is 3.

Best regards - Jan Sindberg