Bug: group-edit.jsp takes over 15 minutes to render

I’ve got a dual xeon 2.8ghz server with 4gb of ram and a user list of more than 31,000 with around 17,000 groups. When I click on the view groups list it takes about 5 or 6 seconds, that’s fine. When I search for a group the comes back nearly instantly, super. However, when I click on a a group to view it, it takes upwards of 15 minutes. The url is http://serverurl.com:9090/group-edit.jsp?group=groupname This is just a test server with no users actually connecting to it.

What can I do to optimize my server to help this come back a little sooner? Even 30 seconds would be great, but 15 minutes is brutal. Is there a table I can index or something?

The only thing I can think of is that the group membership is being determined by looking at each user object’s memberOf field instead of reading the member field of the group, and I’m not sure how to change that code if it is doing that. I haven’t touched java in years and i can’t make heads of tails of it.

The Openfire server is using an Active Directory server for it’s user and group list and a separate server to host the DB. I’m running on RHEL 5.1.

Any ideas?

Ok… I think i’ve traced it down a bit. In JDBCGroupProvider.java there’s this function:

private Collection<JID> getMembers(String groupName, boolean adminsOnly) {

List<JID> members = new ArrayList<JID>();

Connection con = null;

PreparedStatement pstmt = null;

ResultSet rs = null;

try {

con = DriverManager.getConnection(connectionString);

if (adminsOnly) {

if (loadAdminsSQL == null) {

return members;

}

pstmt = con.prepareStatement(loadAdminsSQL);

}

else {

pstmt = con.prepareStatement(loadMembersSQL);

}

pstmt.setString(1, groupName);

rs = pstmt.executeQuery();

while (rs.next()) {

String user = rs.getString(1);

if (user != null) {

JID userJID;

if (user.contains("@")) {

userJID = new JID(user);

}

else {

userJID = server.createJID(user, null);

}

members.add(userJID);

}

}

}

catch (SQLException e) {

Log.error(e);

}

finally {

DbConnectionManager.closeConnection(rs, pstmt, con);

}

return members;

}

Where can I find out the value for loadMembersSQL ? I’m curious what the SQL statement is.

I found a post from 2007, someone had the same problem and they didn’t get an answer. Hopefully one of the devs will take pity on me and read this post.

Here’s the link to the other post: http://www.igniterealtime.org/community/message/143673#143673

Can a Dev please add this as an issue on the Issue Tracker under the Admin Console?

I’ve run into this issue before. It has to do with the way we handle group AD lookups. I know Jadestorm is planning a bunch of AD improvements for 3.6.0 , I will ping him to make sure that this is on his list. If not I could probably take a stab at it.

Cheers,

Nate