‘top’ is showing us massive spikes in cpu usage by java, closely followed by a mysql spike. So java will burst up to 50% of the cpu, and mysql will go to 25%. So we think its the connectivity between the two servers.
Yesterday this query “SELECT username FROM ofGroupUser WHERE administrator=? AND groupName=? ORDER BY username” was running at around 1.1 million times an hour. We got this from the query logs in Openfire.
Our users table in a separate database, the groups table is still in the standard Openfire tables.
I’m more than willing to pay for troubleshooting help if anyone is interested in a consulting job.
Looking at the code, I only see this query run by: ./org/jivesoftware/openfire/group/DefaultGroupProvider.java , but it does not match what you have above. The code has:
private static final String LOAD_ADMINS =
“SELECT username FROM ofGroupUser WHERE administrator=1 AND groupName=? ORDER BY username”;
private static final String LOAD_MEMBERS =
“SELECT username FROM ofGroupUser WHERE administrator=0 AND groupName=? ORDER BY username”;
which version of openfire are you using? Which plugins do you have enabled?
Do you also see a lot of “SELECT description FROM ofGroup WHERE groupName=?” or “INSERT INTO ofGroup (groupName, description) VALUES (?, ?)” statements?
If it is called within the DefaultGroupProvider then the number of these SQLs should be 50% of the number of the “SELECT username …” statements.
At the moment we’ve been up for about an hour with a peak load of 45 users. The database statistics for the two queires metioned show:
SELECT username FROM ofGroupUser WHERE administrator=? AND groupName=? ORDER BY username
7,440
2,113
0
SELECT description FROM ofGroup WHERE groupName=?
3,916
754
0
As a reference we only have ~1400 created users. 323 groups with 1480 group assignments (ofGroupUsers)
We are using a seperate auth and user provider, but not group provider. Switching back to the default providers for auth and user made no difference.
Could it just be some kindof malformed roster request? I’ll turn on auditing and follow this post with an example requst and response…