- Posts: 11
- Thank you received: 0
Kunena 7.0.11 & Kunena 6.4.16 – Security Updates Released and K7.1 in RC1 2
The Kunena team has announce the arrival of three simultaneous security release : K6.4.16, K7.0.11 and K7.1 RC2. Just a reminder K6.4.16 receives only securities fixes untill end of 2026, so it's advised for users to upgrade to K7.0.11. K7.0.11 is the last release of the K7.0 because it's replaced by K7.1 branch with the stable release in the corner. The translations for K7.1 on crowdin.com/project/kunena-forum-7-1 needs to be checked or improved becasue it has been generated by TM (Translation Machine).
Question Query taking a long time
We recently upgraded from Fireboard to Kunena 1.08 and now 1.09. Post upgrade, our dedicated mySQL server started "choking" meaning CPU utilization is continually above 50% (normally below 20%) and for a high traffic website such as ours, this is a problem.
In looking at the "slow queries" log for mySQL I noticed this query as the primary cause of the problem. This query is executed many times.
# Query_time: 6 Lock_time: 0 Rows_sent: 1 Rows_examined: 260619
SELECT g.*
FROM jos_core_acl_aro_groups AS g
INNER JOIN jos_core_acl_groups_aro_map AS gm ON gm.group_id = g.group_id
INNER JOIN jos_core_acl_aro AS ao ON ao.aro_id = gm.aro_id
WHERE ao.value='[SOME_NUMBER]';
I searched the Joomla configuration files and found that this query is executed by the _getGroup function in "gacl.api.class.php" in the \includes directory of Joomla. This API function is internal to the class and is called by public function "getAroGroup" in the same file.
The public "getAroGroup" is called in very few places, as follows:
/includes/joomla.php:
$grp = $acl->getAroGroup( $row->id );
/components/com_kunena/template/default/post.php:
$_arogrp = $acl->getAroGroup($subs->id);
/components/com_kunena/kunena.php:
$aro_group = $acl->getAroGroup($my->id);
As we didn't have this issue before the upgrade, I believe that the problems are created by Kunena's usage of this function call which of course is exponentially increased by the slowness of the response.
I'm looking for 2 possible fixes:
1. Is Kunena correctly using this function (i.e. is it necessary to call it as many times as it does or maybe there's a better way)?
2. If this is not a Kunana problem, i.e. the Joomla query needs to be more efficient, does anyone know how by using indexing or other means to make this query run more quickly?
I'm posting this on the Kunena forum b/c this problem didn't exist prior to the installation of Kunena. The query may have been slow, but it wasn't running as many times as Kunena is running it so it wasn't an issue.
Many thanks!
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
To help me better understand what you've written, I'm attaching a screenshot that illustrates the area we're discussing. Can you tell me, please, how to set the "value_only" index attribute to the value column?
image missing http://www.kunena.com/media/kunena/attachments/legacy/images/core_acl_aro_tableSchema.jpg
Please Log in or Create an account to join the conversation.
If you consider altering the underlying DB structure of Joomla (or Kunena) you must be an SQL expert (or guru) and understand way the developers have chosen a specific structure and how your change affect the code utilizing the chosen DB structure.
If you want to learn more about SQL, www.mysql.com have lots of documentation.
Some starting point about indices:
dev.mysql.com/doc/refman/5.1/en/create-index.html
dev.mysql.com/doc/refman/5.1/en/mysql-indexes.html
Visit the Kunena documantation .
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Visit the Kunena documantation .
Please Log in or Create an account to join the conversation.