httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 40644] - mod_authnz_ldap or mod_ldap does not reuse ldap connexions
Date Thu, 05 Oct 2006 21:44:36 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40644>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40644





------- Additional Comments From bnicholes@apache.org  2006-10-05 14:44 -------
(In reply to comment #9)
> If I replace the trylock by a lock , the connection count stop to increase.

The reason why it stops increasing is because you have effectly eliminated the 
connection pool.  By replacing the trylock with a lock, all threads will block 
waiting for their turn to use the single ldap connection.  No new connections 
will ever be created.  So rather than increasing performance by allowing 
multiple connections in a multi-threaded environment.  You would serialize 
everthing on a single connection.
  
> Any better solution?

I am still not seeing a reuse problem in my testing so I am unable to 
formulate a better solution to a problem that I am unable to identify.  In my 
testing I am seeing the connections being reused as they should.  The idea 
here is to satisfy a performance issue.  Creating and destroying LDAP 
connections is a lot of overhead.  A connection pool is a way to eliminate the 
overhead.  If the ldap traffic requires 2 connection to addequately perform 
the necessary operations, then the pool will contain 2 connections.  If it 
requires 200 connections, then the pool size will increase to 200.  

> Is it possible to cache the binddn and bindpw information?

There isn't any need to cache the binddn and bindpw.  The same dn and password 
are used for all of the connections created for the associated AuthLDAPURL.  
This is the binddn and bindpw that was specified through the AuthLDAPBindDN 
and AuthLDAPBindPassword directives.  If you are referring to the user names 
and passwords that are passed in by the user for authentication, those are 
already cached in an entirely different area of the code.  But that is a 
completely different issue that has nothing to do with the ldap connection 
pool.

> When does the ldap connection pool cleanup occur?

Depends on what you are talking about.  Bad connections or broken connections 
are taken care of all of the time.  If a bad connection is detected, it is 
deleted and re-established, but the size of the pool remains the same.  
Shrinking the size of the connection pool is never done.  The only time that 
the connection pool is cleaned up is at shutdown time.  Many LDAP servers will 
have a connection timeout set.  For example openldap has the idletimeout 
directive which will unbind an idle connection after a specified period of 
time.  In this case, mod_ldap would detect that the connection has been 
forcibly closed and re-establish the connection the next time it is needed. 



-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message