Anonymous_User Absent Member.
Absent Member.
389 views

LDAPSearchResults.hasMore take long after redeploying the AP


Hi
I am using JLDAP in my web-application deployed on Oracle Application
Server (10.1.3.3).
The application does some search processes on thoudsands users stored
on a LDAP server.
It usuallly works fine but after redeploying the application, the
processing time gets appx 10 times slower.
Checking thread dump shows me that the application has been busy in
LDAPSearchResults.hasMore()
(more details: com.novell.ldap.LDAPAttribute.add and
com.novell.ldap.LDAPAttribute.equals),
which mean that it had been looping, trying to take a great number of
attributes (which are actually user entries).

It is reasonable that when the number of attributes get larger, the
processing time must grow.
But i dont understand why this phenomenon happend only after
redeploying the application.

Does anyone get some hints ?

Thanks.


--
huucuong
------------------------------------------------------------------------
huucuong's Profile: http://forums.novell.com/member.php?userid=115472
View this thread: http://forums.novell.com/showthread.php?t=443445

Labels (1)
0 Likes
2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: LDAPSearchResults.hasMore take long after redeploying the AP

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Care to post the first part of your code from where you bind until the
..hasMore() is running slowly? Also, if this is accessing eDirectory the
LDAP output from ndstrace would be helpful to see if it's the client
alone or if the server is being slow. Are both of your applications
pointing to the same LDAP source?

Good luck.


- --
Want to yell at me in person?
Come to BrainShare 2011 in October: http://tinyurl.com/brainshare2011
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJOTl0MAAoJEF+XTK08PnB5y0cQAKBK51WZOdsZWGFpotDIGm2t
tqYxK5VpioZ1e1jgJS7UtPhKw783BTlHeDFcorwj2JP/Fy5ZCue5TTf+EUCwZCS/
Ywk/6cNYTQCTTl7zNYlIHwuBaRBmOZ65qjUHQa7E5KwPXJEqqvuRqskQfAG7c096
C5tFAEY/V/AiZC8wxkKr8NqbRwokPSkeEmJubAV0PggkeOHUu+eyrpQDzg/mbm2g
HOI1cFDJKSXjx6uZNba+n6m1uhfaqukCcHJG834jElfskQPs0zkyeSY1jDCS3XvB
iAVcOXHfS0gV66N378S9GI3kMzHWXCzHAWMmHtGNOogBz6BWNKjpgzUAvGF62bTF
FLxH86QAl49YgbFDHQKAuJx2EjyY/Ty2QrJsV2rYdyB28MeinO22TBW4bwPwUNSC
aj19U9EapzmDq5pSmChhPOGuI14XfcVzPu/3sTo0tiWvT1MqEAXUnw6XUpv+OMXI
ntvcF52ek0BEIf+aPMWB1lMVWql8hiXRGEhc4+cKU4aa7iXiReU39Xw94UOiMhZg
9fO6C0RNQM87zXYs4jmMhvTW2Q0b7kHEDXNjWVAwqpC70pq3pMkgs+uL62iPCnFC
RPHPlDaEVxvUkdBIKPjbfySbp5qc+q/kNrfiLqG7WarDHDwR0q4go3jz67hzAsfM
7yee0Nz8xqr+G1RkzCKd
=f+cf
-----END PGP SIGNATURE-----
0 Likes
Anonymous_User Absent Member.
Absent Member.

Re: LDAPSearchResults.hasMore take long after redeploying the AP


Dear ab

Thanks for the quick reply.
Here is one part of my code.

-----------------------------
public void execute() throws Exception {
int maxResult = searchCondition_.getMaxResult();
int scope = searchCondition_.getScope();
AuthLDAPDN baseDN = searchCondition_.getBaseDN();
String filter = null;
if (searchCondition_.getFilter() != null) {
filter =
searchCondition_.getFilter().getLDAPFilterStr();
}
String[] attrs = searchCondition_.getAttrs();
String sortKey = searchCondition_.getSortKey();
boolean typesOnly = searchCondition_.isTypesOnly();
boolean sort = searchCondition_.enableSort();
LDAPConnection connection = getLDAPBoundConnection();
LDAPSearchResults results = null;
LDAPSearchConstraints constraints = new
LDAPSearchConstraints();
List<AuthLDAPEntry> entries = new
ArrayList<AuthLDAPEntry>();

constraints.setMaxResults(maxResult);
constraints.setReferralFollowing(true);

if (serverSideSorting_) {
if (sortKey != null && sortKey.trim().length() != 0) {
LDAPSortKey sortOrder = new LDAPSortKey(sortKey,
true);
LDAPSortControl sortControl = new
LDAPSortControl(sortOrder, true);
constraints.setControls(sortControl);
}
}

try {
results = connection.search(baseDN.toString(), scope,
filter, attrs, typesOnly, constraints);

while (results.hasMore()) {
entries.add(new AuthLDAPEntry(results.next()));
}
} finally {
releaseLDAPConnection(connection);
}

if (!serverSideSorting_ && sort) {
Collections.sort(entries, new
LDAPResultsComparator(sortKey));
}
result_ = entries;
}

--------------------

Hope it gives you some hints.

About my case, LDAP servers (x2) are in active/active mode.
Both have the same database.
Thank you.


--
huucuong
------------------------------------------------------------------------
huucuong's Profile: http://forums.novell.com/member.php?userid=115472
View this thread: http://forums.novell.com/showthread.php?t=443445

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.