High mysql cpu usage after save article

Discussion regarding Joomla! 3.x Performance issues.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
kalytheo
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Fri Apr 09, 2021 3:56 pm

High mysql cpu usage after save article

Post by kalytheo » Fri Apr 09, 2021 4:04 pm

Hello,

we have the following problem in Joomla and we still can not figure out what is causing it. After saving an article (which saves really fast) and for about a minute the mysql cpu goes really high. The backend is working quickly, the frontend gives a 524 error, while the mysql cpu remains high.

We suspect widgetkit (it loads the last 6 articles from a category in homepage for several categories)

In the slow query log we get the following

Count: 1 Time=5.01s (5s) Lock=0.00s (0s) Rows=6.0 (6), xxxx@localhost
SELECT STRAIGHT_JOIN a.fulltext, a.id, a.title, a.alias, a.introtext, a.state, a.catid, a.created, a.created_by, a.created_by_alias, a.modified, a.modified_by, a.publish_up, a.publish_down, a.images, a.urls, a.attribs, a.metadata, a.metakey, a.metadesc, a.access, a.hits, a.featured, a.language,c.title AS category_title, c.path AS category_route, c.access AS category_access, c.alias AS category_alias,c.published, c.published AS parents_published, c.lft,CASE WHEN a.created_by_alias > ' ' THEN a.created_by_alias ELSE ua.name END AS author,ua.email AS author_email,parent.title as parent_title, parent.id as parent_id, parent.path as parent_route, parent.alias as parent_alias
FROM #_content AS a
LEFT JOIN #_categories AS c ON c.id = a.catid
LEFT JOIN #_users AS ua ON ua.id = a.created_by
LEFT JOIN #_users AS uam ON uam.id = a.modified_by
LEFT JOIN #_categories as parent ON parent.id = c.parent_id
INNER JOIN `#_contentitem_tag_map` AS `tagmap` ON tagmap.tag_id = 239 AND tagmap.content_item_id = a.id AND tagmap.type_alias = 'com_content.article'
WHERE a.access IN (1,1,5) AND c.access IN (1,1,5) AND c.published = 1 AND a.state = 1 AND (a.publish_up = '0000-00-00 00:00:00' OR a.publish_up <= '2021-04-08 09:40:53') AND (a.publish_down = '0000-00-00 00:00:00' OR a.publish_down >= '2021-04-08 09:40:53')
ORDER BY a.publish_up DESC LIMIT 6


Please advise.

Thank you
Theo

User avatar
pe7er
Joomla! Master
Joomla! Master
Posts: 24929
Joined: Thu Aug 18, 2005 8:55 pm
Location: Nijmegen, Netherlands
Contact:

Re: High mysql cpu usage after save article

Post by pe7er » Sat Apr 10, 2021 9:22 am

Welcome to Joomla forum!

Please use Forum Post Assistant to give info about your setup:
https://forumpostassistant.github.io/docs/
Kind Regards,
Peter Martin, Global Moderator
Company website: https://db8.nl/en/ - Joomla specialist, Nijmegen, Netherlands
The best website: https://the-best-website.com


Locked

Return to “Performance - Joomla! 3.x”