Mysql uses 100% of CPU
-
Hi,
I started having a problem with mysqld.exe using 100% of CPU.
I ran ‘SHOW FULL PROCESSLIST;’ and I got below query running and never ending:
SELECT SQL_CALC_FOUND_ROWS kconl_posts.ID FROM kconl_posts INNER JOIN kconl_postmeta ON ( kconl_posts.ID = kconl_postmeta.post_id ) INNER JOIN kconl_postmeta AS mt1 ON ( kconl_posts.ID = mt1.post_id ) INNER JOIN kconl_postmeta AS mt2 ON ( kconl_posts.ID = mt2.post_id ) INNER JOIN kconl_postmeta AS mt3 ON ( kconl_posts.ID = mt3.post_id ) INNER JOIN kconl_postmeta AS mt4 ON ( kconl_posts.ID = mt4.post_id ) INNER JOIN kconl_postmeta AS mt5 ON ( kconl_posts.ID = mt5.post_id ) INNER JOIN kconl_postmeta AS mt6 ON ( kconl_posts.ID = mt6.post_id ) INNER JOIN kconl_postmeta AS mt7 ON ( kconl_posts.ID = mt7.post_id ) INNER JOIN kconl_postmeta AS mt8 ON ( kconl_posts.ID = mt8.post_id ) INNER JOIN kconl_postmeta AS mt9 ON ( kconl_posts.ID = mt9.post_id ) INNER JOIN kconl_postmeta AS mt10 ON ( kconl_posts.ID = mt10.post_id ) INNER JOIN kconl_postmeta AS mt11 ON ( kconl_posts.ID = mt11.post_id ) INNER JOIN kconl_postmeta AS mt12 ON ( kconl_posts.ID = mt12.post_id ) INNER JOIN kconl_postmeta AS mt13 ON ( kconl_posts.ID = mt13.post_id ) WHERE 1=1 AND ( ( kconl_postmeta.meta_key = 'routine_action' AND kconl_postmeta.meta_value IN ('task_scheduler_action_delete_task_log') ) AND ( mt1.meta_key = 'occurrence' AND mt1.meta_value IN ('constant') ) AND ( mt2.meta_key = '_max_root_log_count' AND mt2.meta_value IN ('0') ) AND ( mt3.meta_key = '_target_task_id' AND mt3.meta_value IN ('3277') ) AND ( mt4.meta_key = '_max_root_log_count_of_the_target' AND mt4.meta_value IN ('10') ) AND ( mt5.meta_key = 'owner_task_id' AND mt5.meta_value IN ('3277') ) AND ( mt6.meta_key = 'parent_routine_log_id' AND mt6.meta_value IN ('0') ) AND ( mt7.meta_key = '_max_execution_time' AND mt7.meta_value IN ('120') ) AND ( mt8.meta_key = '_force_execution' AND mt8.meta_value IN ('0') ) AND ( mt9.meta_key = '_hung_routine_handle_type' AND mt9.meta_value IN ('0') ) AND ( mt10.meta_key = '_yoast_wpseo_content_score' AND mt10.meta_value IN ('30') ) AND ( mt11.meta_key = 'custom_action' AND mt11.meta_value IN ('my_custom_action') ) AND ( mt12.meta_key = '_qts_slug_da' AND mt12.meta_value IN ('rz_test_task') ) AND ( mt13.meta_key = '_qts_slug_en' AND mt13.meta_value IN ('rz_test_task') ) ) AND kconl_posts.post_type IN ('ts_task', 'ts_routine', 'ts_thread') AND ((kconl_posts.post_status = 'publish' OR kconl_posts.post_status = 'private')) GROUP BY kconl_posts.ID ORDER BY kconl_posts.post_date DESC, kconl_posts.ID DESC LIMIT 0, 1
This is on the local server. CPU first is at around 30%, then it gets higher and higher. It reaches 100% and then my programs crash.
I believe this query is run by Task Scheduler plug in.
What step can I take to find the problem?
Thanks
- The topic ‘Mysql uses 100% of CPU’ is closed to new replies.