On Mar 29, 2006, at 7:33 PM, Mario Olimpio de Menezes wrote:
On Wednesday 29 March 2006 10:36, you wrote:
Looks like requests return too many results, yes. This should not
happen at login time.
Well, for some reason, it was happening.
Let's say that we are quite interested to know if this is related to
your specific setup or if generic cps fires huge queries to LDAP
backings at login time, as this can be a serious hit on performance.
I did a small search on python-ldap, and tried to fix
LDAPBackingDirectory.py
myself, but failed. Bellow is, commented out, the code I tried.
When I was
giving up, I tried one last thing: empty ldap_entries[] on
SIZELIMIT_EXCEEDED
exception. It seems to be working, but I believe we should have a
better
handling of this limitation.
I believe it's there to make sure that we don't let such queries
happen. I agree that this isn't optimal for production servers, though.
Everything seems to be working fine now: I can login, search users
in Members
directory, although not in Addressbook (public). BTW, how to merge
this?
this is from LDAPBackingDirectory.py, in searchLDAP function,
around line 805.
-------------------------------------
try:
ldap_entries = conn.search_s(base, scope, toUTF8
(filter), attrs)
except ldap.NO_SUCH_OBJECT:
raise ConfigurationError("Directory '%s': Invalid
search base "
"'%s'" % (self.getId(), base))
except ldap.SERVER_DOWN:
raise ConfigurationError("Directory '%s': LDAP server
is down"
% self.getId())
except ldap.SIZELIMIT_EXCEEDED:
ldap_entries = []
LOG('searchLDAP', TRACE, " -> results=%s" % (ldap_entries[:
20],))
If that works for you, this really proves that the query was a bit
useless.
------------------------------------
Thanks for all help up to now!
You're welcome!
---------
Georges Racinet Nuxeo SAS
[EMAIL PROTECTED] http://nuxeo.com
Tel: +33 (0) 1 40 33 71 73
_______________________________________________
cps-users mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/cps-users