Keyword

High cpu usage

  • Charles
  • Charles's Avatar Topic Author
  • Offline
  • Senior Member
More
6 years 10 months ago #166279 by Charles
High cpu usage was created by Charles
Hello,

I have a lot of problem with high cpu usage. My provider send me a sql query, i tried to debug it without success.

SQL QUERY :
| 2221668 | dbname | localhost | dbname | Query | 1 | Copying to tmp table | SELECT DISTINCT i.*,c.name AS categoryname,c.id AS categoryid, c.alias AS categoryalias, c.params AS | 0.000 |

Joomla version : 3.8.3
K2 : 2.8.0
More than : 10 000 items in k2
Cache is enabled.

Do you have a solution for this ?
Thank's in advance.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 10 months ago #166283 by Krikor Boghossian
Replied by Krikor Boghossian on topic High cpu usage
Hello,

Is this the entire query? I think some parts are missing.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Charles
  • Charles's Avatar Topic Author
  • Offline
  • Senior Member
More
6 years 10 months ago #166287 by Charles
Replied by Charles on topic High cpu usage
My provider said the sql query are not loged...

Please Log in or Create an account to join the conversation.

  • Charles
  • Charles's Avatar Topic Author
  • Offline
  • Senior Member
More
6 years 10 months ago #166302 by Charles
Replied by Charles on topic High cpu usage
Hello,

I have more information about this SQL :
SELECT DISTINCT i.*,c.name AS categoryname,c.id AS categoryid, c.alias AS categoryalias, c.params AS categoryparams 
  FROM mydb_k2_items as i RIGHT JOIN mydb_k2_categories c 
  ON c.id = i.catid 
  WHERE i.published = 1 
  AND i.access IN(1,1,2,3,6,7) 
  AND i.trash = 0 
  AND c.published = 1 
  AND c.access IN(1,1,2,3,6,7)  
  AND c.trash = 0 
  AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2018-01-17 16:21:26' ) 
  AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2018-01-17 16:21:26' ) 
  AND i.catid IN(18) 
  ORDER BY i.created DESC 
  LIMIT 0, 10
id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
1	SIMPLE	c	const	PRIMARY,category,published,access,trash	PRIMARY	4	const	1	100.00	
1	SIMPLE	i	index	item,catid	created	8	NULL	70	100.00	Using where
Status	Duration
starting	0.02 ms
Waiting for query cache lock	0.00 ms
init	0.00 ms
checking query cache for query	0.06 ms
checking permissions	0.00 ms
checking permissions	0.00 ms
Opening tables	0.02 ms
After opening tables	0.01 ms
System lock	0.00 ms
Table lock	0.00 ms
After opening tables	0.00 ms
Waiting for query cache lock	0.00 ms
After opening tables	0.02 ms
init	0.04 ms
optimizing	0.03 ms
statistics	0.12 ms
preparing	0.06 ms
executing	0.01 ms
Sorting result	0.01 ms
Sending data	0.23 ms
Waiting for query cache lock	0.00 ms
Sending data	0.07 ms
Waiting for query cache lock	0.00 ms
Sending data	0.12 ms
Waiting for query cache lock	0.00 ms
Sending data	0.10 ms
Waiting for query cache lock	0.00 ms
Sending data	0.01 ms
end	0.01 ms
query end	0.01 ms
closing tables	0.01 ms
freeing items	0.01 ms
updating status	0.00 ms
Waiting for query cache lock	0.00 ms
updating status	0.01 ms
Waiting for query cache lock	0.00 ms
updating status	0.00 ms
storing result in query cache	0.01 ms
cleaning up	0.00 ms

And files :
19	JDatabaseDriverMysqli->execute()	JROOT/libraries/joomla/database/driver.php:1691
18	JDatabaseDriver->loadObjectList()	JROOT/modules/mod_k2_content/helper.php:286
17	modK2ContentHelper::getItems()	JROOT/modules/mod_k2_content/mod_k2_content.php:82
16	include JROOT/modules/mod_k2_content/mod_k2_content.php	JROOT/libraries/src/Helper/ModuleHelper.php:201
15	Joomla\CMS\Helper\ModuleHelper::renderModule()	JROOT/modules/mod_sptab/helper.php:31
14	modspTabHelper::getTabs()	JROOT/modules/mod_sptab/mod_sptab.php:84
13	include JROOT/modules/mod_sptab/mod_sptab.php	JROOT/libraries/src/Helper/ModuleHelper.php:201
12	Joomla\CMS\Helper\ModuleHelper::renderModule()	Même appel que celui de la ligne ci-dessous.
11	call_user_func_array()	JROOT/libraries/src/Cache/Controller/CallbackController.php:173
10	Joomla\CMS\Cache\Controller\CallbackController->get()	JROOT/libraries/src/Helper/ModuleHelper.php:610
9	Joomla\CMS\Helper\ModuleHelper::moduleCache()	JROOT/libraries/src/Document/Renderer/Html/ModuleRenderer.php:95
8	Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render()	JROOT/libraries/src/Document/Renderer/Html/ModulesRenderer.php:47
7	Joomla\CMS\Document\Renderer\Html\ModulesRenderer->render()	JROOT/libraries/src/Document/HtmlDocument.php:491
6	Joomla\CMS\Document\HtmlDocument->getBuffer()	JROOT/libraries/src/Document/HtmlDocument.php:782
5	Joomla\CMS\Document\HtmlDocument->_renderTemplate()	JROOT/libraries/src/Document/HtmlDocument.php:557
4	Joomla\CMS\Document\HtmlDocument->render()	JROOT/libraries/src/Application/CMSApplication.php:1117
3	Joomla\CMS\Application\CMSApplication->render()	JROOT/libraries/src/Application/SiteApplication.php:780
2	Joomla\CMS\Application\SiteApplication->render()	JROOT/libraries/src/Application/CMSApplication.php:273
1	Joomla\CMS\Application\CMSApplication->execute()	JROOT/index.php:49

I hope this help you !
Regards,
Charly

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 10 months ago #166307 by Krikor Boghossian
Replied by Krikor Boghossian on topic High cpu usage
This is most likely an administrator filter.
In K2's advanced settings can you locate the "Disable ordering compacting" setting and disable it?

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Charles
  • Charles's Avatar Topic Author
  • Offline
  • Senior Member
More
6 years 10 months ago - 6 years 10 months ago #166312 by Charles
Replied by Charles on topic High cpu usage
Thank's for reply.

I have set this option to "No" but the problem persist.

Any idea ?

[Edit]
Last edit: 6 years 10 months ago by Charles.

Please Log in or Create an account to join the conversation.

  • Charles
  • Charles's Avatar Topic Author
  • Offline
  • Senior Member
More
6 years 10 months ago - 6 years 10 months ago #166319 by Charles
Replied by Charles on topic High cpu usage
Hello,

An another query SQL with a too long time execution.
SELECT DISTINCT i.*,c.name AS categoryname,c.id AS categoryid, c.alias AS categoryalias, c.params AS categoryparams 
  FROM mydb_k2_items as i RIGHT JOIN pdyqm_k2_categories c 
  ON c.id = i.catid 
  WHERE i.published = 1 
  AND i.access IN(1,1,2,3,6,7) 
  AND i.trash = 0 
  AND c.published = 1 
  AND c.access IN(1,1,2,3,6,7)  
  AND c.trash = 0 
  AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2018-01-18 11:49:34' ) 
  AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2018-01-18 11:49:34' ) 
  AND i.catid IN (2,3,4,6,7,8,9,10,11,14,21) 
  ORDER BY i.id DESC 
  LIMIT 0, 5
Status	Duration
starting	0.02 ms
Waiting for query cache lock	0.00 ms
init	0.00 ms
checking query cache for query	0.06 ms
checking permissions	0.00 ms
checking permissions	0.00 ms
Opening tables	0.01 ms
After opening tables	0.01 ms
System lock	0.00 ms
Table lock	0.00 ms
After opening tables	0.00 ms
Waiting for query cache lock	0.00 ms
After opening tables	0.02 ms
init	0.04 ms
optimizing	0.02 ms
statistics	0.17 ms
preparing	0.03 ms
executing	0.00 ms
Copying to tmp table	0.16 ms
Copying to tmp table	359.22 ms
Sorting result	14.43 ms
Sending data	0.09 ms
Waiting for query cache lock	0.00 ms
Sending data	0.04 ms
Waiting for query cache lock	0.00 ms
Sending data	0.01 ms
end	0.01 ms
removing tmp table	4.12 ms
end	0.01 ms
query end	0.01 ms
closing tables	0.01 ms
freeing items	0.02 ms
updating status	0.00 ms
Waiting for query cache lock	0.00 ms
updating status	0.01 ms
Waiting for query cache lock	0.00 ms
updating status	0.00 ms
storing result in query cache	0.01 ms
cleaning up	0.00 ms
#	Appel	Fichier et numéro de ligne
16	JDatabaseDriverMysqli->execute()	JROOT/libraries/joomla/database/driver.php:1691
15	JDatabaseDriver->loadObjectList()	JROOT/modules/mod_k2_content/helper.php:286
14	modK2ContentHelper::getItems()	JROOT/modules/mod_k2_content/mod_k2_content.php:82
13	include JROOT/modules/mod_k2_content/mod_k2_content.php	JROOT/libraries/src/Helper/ModuleHelper.php:201
12	Joomla\CMS\Helper\ModuleHelper::renderModule()	Même appel que celui de la ligne ci-dessous.
11	call_user_func_array()	JROOT/libraries/src/Cache/Controller/CallbackController.php:173
10	Joomla\CMS\Cache\Controller\CallbackController->get()	JROOT/libraries/src/Helper/ModuleHelper.php:610
9	Joomla\CMS\Helper\ModuleHelper::moduleCache()	JROOT/libraries/src/Document/Renderer/Html/ModuleRenderer.php:95
8	Joomla\CMS\Document\Renderer\Html\ModuleRenderer->render()	JROOT/libraries/src/Document/Renderer/Html/ModulesRenderer.php:47
7	Joomla\CMS\Document\Renderer\Html\ModulesRenderer->render()	JROOT/libraries/src/Document/HtmlDocument.php:491
6	Joomla\CMS\Document\HtmlDocument->getBuffer()	JROOT/libraries/src/Document/HtmlDocument.php:782
5	Joomla\CMS\Document\HtmlDocument->_renderTemplate()	JROOT/libraries/src/Document/HtmlDocument.php:557
4	Joomla\CMS\Document\HtmlDocument->render()	JROOT/libraries/src/Application/CMSApplication.php:1117
3	Joomla\CMS\Application\CMSApplication->render()	JROOT/libraries/src/Application/SiteApplication.php:780
2	Joomla\CMS\Application\SiteApplication->render()	JROOT/libraries/src/Application/CMSApplication.php:273
1	Joomla\CMS\Application\CMSApplication->execute()	JROOT/index.php:49

Thank's in advance for you're help.
Last edit: 6 years 10 months ago by Charles.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
6 years 10 months ago #166320 by Krikor Boghossian
Replied by Krikor Boghossian on topic High cpu usage
Try setting to yes. Disabling this feature will help your site.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Charles
  • Charles's Avatar Topic Author
  • Offline
  • Senior Member
More
6 years 10 months ago #166324 by Charles
Replied by Charles on topic High cpu usage
Previously this option was activated. This does not solve the problem.

Do you have another idea?
Regards,
Charly

Please Log in or Create an account to join the conversation.

  • Charles
  • Charles's Avatar Topic Author
  • Offline
  • Senior Member
More
6 years 10 months ago #166343 by Charles
Replied by Charles on topic High cpu usage
Hello,

Excuse me for insisting but do you have a solution? My site is often unreachable because of its ...

Regards,
Charly

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum