- Posts: 4
COMMUNITY FORUM
K2 Query causing CPU overload on server
- Leah Maderal
- Topic Author
- Offline
- New Member
Less
More
12 years 9 months ago #62574
by Leah Maderal
K2 Query causing CPU overload on server was created by Leah Maderal
GoDaddy shut down the site weddingsinplaya.com because this query is causing massive CPU load on the server. I have it back online temporarily.
Since it looks like it has something to do with K2, I thought you might have some advice on how to clear this up.
Thanks.
Problematic query:
SELECT i.title AS title,
i.metadesc,
i.metakey,
c.name as section,
i.image_caption,
i.image_credits,
i.video_caption,
i.video_credits,
i.extra_fields_search,
i.created,
CONCAT(i.introtext, i.fulltext) AS text,
CASE WHEN CHAR_LENGTH(i.alias) THEN CONCAT_WS(':', i.id, i.alias) ELSE i.id END as slug,
CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as catslug
FROM boda_k2_items AS i
INNER JOIN boda_k2_categories AS c ON c.id=i.catid AND c.access IN(1,1)
WHERE (MATCH(i.title, i.introtext, i.`fulltext`,i.extra_fields_search,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.metadesc,i.metakey) AGAINST ('??alert(203)*' IN BOOLEAN MODE)
)
AND i.trash = 0
AND i.published = 1
AND i.access IN(1,1)
AND c.published = 1
AND c.access IN(1,1)
AND c.trash = 0
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2012-02-10 10:56:18' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2012-02-10 10:56:18' )
GROUP BY i.id ORDER BY i.created DESC LIMIT 0, 50
EXPLAIN:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE i fulltext item,catid,search search 0 1 Using where; Using temporary; Using filesort
1 SIMPLE c eq_ref PRIMARY,category,published,access,trash PRIMARY 4 bodas2012.i.catid 1 Using where
Since it looks like it has something to do with K2, I thought you might have some advice on how to clear this up.
Thanks.
Problematic query:
SELECT i.title AS title,
i.metadesc,
i.metakey,
c.name as section,
i.image_caption,
i.image_credits,
i.video_caption,
i.video_credits,
i.extra_fields_search,
i.created,
CONCAT(i.introtext, i.fulltext) AS text,
CASE WHEN CHAR_LENGTH(i.alias) THEN CONCAT_WS(':', i.id, i.alias) ELSE i.id END as slug,
CASE WHEN CHAR_LENGTH(c.alias) THEN CONCAT_WS(':', c.id, c.alias) ELSE c.id END as catslug
FROM boda_k2_items AS i
INNER JOIN boda_k2_categories AS c ON c.id=i.catid AND c.access IN(1,1)
WHERE (MATCH(i.title, i.introtext, i.`fulltext`,i.extra_fields_search,i.image_caption,i.image_credits,i.video_caption,i.video_credits,i.metadesc,i.metakey) AGAINST ('??alert(203)*' IN BOOLEAN MODE)
)
AND i.trash = 0
AND i.published = 1
AND i.access IN(1,1)
AND c.published = 1
AND c.access IN(1,1)
AND c.trash = 0
AND ( i.publish_up = '0000-00-00 00:00:00' OR i.publish_up <= '2012-02-10 10:56:18' )
AND ( i.publish_down = '0000-00-00 00:00:00' OR i.publish_down >= '2012-02-10 10:56:18' )
GROUP BY i.id ORDER BY i.created DESC LIMIT 0, 50
EXPLAIN:
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE i fulltext item,catid,search search 0 1 Using where; Using temporary; Using filesort
1 SIMPLE c eq_ref PRIMARY,category,published,access,trash PRIMARY 4 bodas2012.i.catid 1 Using where
Please Log in or Create an account to join the conversation.
- Leah Maderal
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
12 years 9 months ago #62575
by Leah Maderal
Replied by Leah Maderal on topic Re: K2 Query causing CPU overload on server
Does anyone recognize this query at all? GoDaddy is about to take all my hosted sites offline because the query is overloading the CPU.
Please Log in or Create an account to join the conversation.
- Aaron
- Offline
- Premium Member
12 years 9 months ago #62576
by Aaron
Aaron :)
Replied by Aaron on topic Re: K2 Query causing CPU overload on server
Has Godaddy helped pinpoint the query to a particular file/script?
Aaron :)
Please Log in or Create an account to join the conversation.
- Bryan Smith
- Offline
- Premium Member
Less
More
- Posts: 130
12 years 9 months ago #62577
by Bryan Smith
Replied by Bryan Smith on topic Re: K2 Query causing CPU overload on server
you might want to take a look at the size of your tables. perhaps it's not the query but what it is running against. I had a problem once with a k2 comments open to everyone getting spammed by bots. The table was over 2GB before I noticed the problem.
Please Log in or Create an account to join the conversation.
- Leah Maderal
- Topic Author
- Offline
- New Member
Less
More
- Posts: 4
12 years 9 months ago #62578
by Leah Maderal
Replied by Leah Maderal on topic Re: K2 Query causing CPU overload on server
GoDaddy would not tell me which script generated the query. Annoying. I will look at the tables though, good idea.
Please Log in or Create an account to join the conversation.
- Miguel
- Offline
- New Member
Less
More
- Posts: 1
12 years 7 months ago #62579
by Miguel
Replied by Miguel on topic Re: K2 Query causing CPU overload on server
I had the same problems with ixwebhosting Your account, or a portion or feature of it, has caused an overload on one of our servers. As you are on a shared hosting environment, we must maintain certain levels of performance for all customers on the server.This is monitored by us and we send these notifications out when we notice that a certain account is causing a load on the server degrading performance for everyone else.Your home folder was limited to FTP access only due to excessive CPU usage.
Your consumption of CPU resources:
cpu-min date
160,06 09.04.2012
219,62 08.04.2012
157,12 07.04.2012
249,99 06.04.2012
312,44 05.04.2012
200,59 04.04.2012
322,16 03.04.2012
266,07 02.04.2012
194,51 01.04.2012
199,93 31.03.2012
108,96 30.03.2012
207,26 29.03.2012
I think its the k2 comments. I have tons of comments.
I've blocked the comments but I stil get a lot of querys. What should I do?
Your consumption of CPU resources:
cpu-min date
160,06 09.04.2012
219,62 08.04.2012
157,12 07.04.2012
249,99 06.04.2012
312,44 05.04.2012
200,59 04.04.2012
322,16 03.04.2012
266,07 02.04.2012
194,51 01.04.2012
199,93 31.03.2012
108,96 30.03.2012
207,26 29.03.2012
I think its the k2 comments. I have tons of comments.
I've blocked the comments but I stil get a lot of querys. What should I do?
Please Log in or Create an account to join the conversation.