Title: High CPU USAGE?
Last modified: January 20, 2024

---

# High CPU USAGE?

 *  [qnkov](https://wordpress.org/support/users/qnkov/)
 * (@qnkov)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/high-cpu-usage-58/)
 * Hi, i have problem, which im not sure how to fix. I’m hitting non-stop high cpu
   usage , no matter if i disable most of the plugins i have. Basicaly to many queries?
   My host is shared, but it’s the most expensive. I do have enabled W3 with Redis
   for datebase and object too. I have last ver of WordPress too. I’ve monitors 
   things and i can provide you those images. Tell me what could be done:
 * > [View post on imgur.com](https://imgur.com/a/a1r8wEE)
 * If you can check pictures and give me any advice.
    -  This topic was modified 2 years, 4 months ago by [qnkov](https://wordpress.org/support/users/qnkov/).
    -  This topic was modified 2 years, 4 months ago by [qnkov](https://wordpress.org/support/users/qnkov/).
    -  This topic was modified 2 years, 4 months ago by [qnkov](https://wordpress.org/support/users/qnkov/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/high-cpu-usage-58/#post-17359404)
 * > disable most of the plugins
 * “Most plugins”? Which were left? Just Query Monitor? I may be wrong, but I think
   Query Monitor itself can increase CPU utilization. I recommend using cPanel to
   monitor resource utilization and deactivate _all_ plugins. Also switch to one
   of the default Twenty* themes as a theme can also increase CPU utilization.
 * In basically its out of the box state, your site shouldn’t require excessive 
   CPU resource. Restore your normal theme and plugins, one at a time, checking 
   resource utilization after each. When the problem recurs, the last activated 
   module is the likely cause. Either seek further assistance through that module’s
   dedicated support channel, or find an alternative plugin, or do without.
 *  Thread Starter [qnkov](https://wordpress.org/support/users/qnkov/)
 * (@qnkov)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/high-cpu-usage-58/#post-17359746)
 * [@bcworkz](https://wordpress.org/support/users/bcworkz/)
 * > [View post on imgur.com](https://imgur.com/a/Ow8odul)
 * Check this image from Resource usage
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/high-cpu-usage-58/#post-17359768)
 * All that really shows [@qnkov](https://wordpress.org/support/users/qnkov/) is
   that your site’s using a lot of resources, which you already mentioned.
 * Have you tried any of the steps that bcworkz suggested?
 * If so, what was the result of each step?
 *  Thread Starter [qnkov](https://wordpress.org/support/users/qnkov/)
 * (@qnkov)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/high-cpu-usage-58/#post-17359781)
 * The problem is that everything is so random. It works perfectly, then it does
   not. I’ve deactived all plugins and the site was working perfectly. I’ve reactived
   them, it worked again perfectly. Then i’ve got message from the hosting provider
   with that:
 *     ```wp-block-code
       Hello,
   
       The lines we observe are:
   
       [Warning] Aborted connection 8440202 to db: 'mydb' user: 'myuser' host: 'localhost' (Query execution was interrupted (max_statement_time exceeded))
       Aborted connection 8441215 to db: 'mydb' user: 'myuser' host: 'localhost' (Got an error writing communication packets)
   
       The case study comes from a database query execution time limit. Due to this PHP processes are not closed and CPU consumption is raised.
       I'm attaching some of the statements that reached max_statement_time:
   
   
       SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
                                                FROM wp_posts LEFT JOIN wp_term_relationships tr ON wp_posts.ID = tr.object_id INNER JOIN wp_term_taxonomy tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN wp_terms t ON t.term_id = tt.term_id INNER JOIN wp_postmeta AS unique_postmeta_selector ON (wp_posts.ID = unique_id)
       postmeta_selector.post_id)
                                                WHERE 1=1 AND ( (unique_postmeta_selector.meta_value LIKE '%sword art online%' AND unique_postmeta_selector.meta_key = 'ero_japanese') OR ((wp_posts.post_title LIKE '%sword%') OR (0 LIKE '%sword%') OR (0 LIKE '%sword%')) AND ((wp_posts.post_title LIKE '%art%') OR (0 LIKE '%
       art%') OR (0 LIKE '%art%')) AND ((wp_posts.post_title LIKE '%online%') OR (0 LIKE '%online%') OR (0 LIKE '%online%'))) AND (wp_posts.post_password = '') AND ((wp_posts.post_type = 'anime' AND (wp_posts.post_status = 'publish'))) OR ((tt.taxonomy = 'post_tag' AND (t.name LIKE '%sword art online%' OR t.slug LIKE '%s
       word art online%')) AND wp_posts.post_status = 'publish' AND wp_posts.post_type = 'anime')
                                                GROUP BY wp_posts.ID
                                                ORDER BY (CASE WHEN wp_posts.post_title LIKE '%sword art online%' THEN 1 WHEN wp_posts.post_title LIKE '%sword%' AND wp_posts.post_title LIKE '%art%' AND wp_posts.post_title LIKE '%online%' THEN 2 WHEN wp_posts.post_title LIKE '%sword%' OR wp_posts.post_title LIKE '%art%' OR w
       p_posts.post_title LIKE '%online%' THEN 3 WHEN wp_posts.post_excerpt LIKE '%sword art online%' THEN 4 WHEN wp_posts.post_content LIKE '%sword art online%' THEN 5 ELSE 6 END), wp_posts.post_date DESC
                                                LIMIT 0, 12;
   
   
       SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
                                                FROM wp_posts LEFT JOIN wp_term_relationships tr ON wp_posts.ID = tr.object_id INNER JOIN wp_term_taxonomy tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN wp_terms t ON t.term_id = tt.term_id INNER JOIN wp_postmeta AS unique_postmeta_selector ON (wp_posts.ID = unique_postmeta_selector .post_id)
                                                WHERE 1=1 AND ( (unique_postmeta_selector.meta_value LIKE '%sword art online%' AND unique_postmeta_selector.meta_key = 'ero_japanese') OR ((wp_posts.post_title LIKE '%sword%') OR (0 LIKE '%sword%') OR (0 LIKE '%sword%')) AND ((wp_posts.post_title LIKE '%art%') OR (0 LIKE '%art%') OR (0 LIKE '%art%')) AND ((wp_posts. post_title LIKE '%online%') OR (0 LIKE '%online%') OR (0 LIKE '%online%'))) AND (wp_posts.post_password = '') AND ((wp_posts.post_type = 'anime' AND (wp_posts.post_status = 'publish'))) OR ((tt.taxonomy = 'post_tag' AND (t.name LIKE '%sword art online%' OR t.slug LIKE '%sword art online%')) AND wp_posts .post_status = 'publish' AND wp_posts.post_type = 'anime')
                                                GROUP BY wp_posts.ID
                                                ORDER BY (CASE WHEN wp_posts.post_title LIKE '%sword art online%' THEN 1 WHEN wp_posts.post_title LIKE '%sword%' AND wp_posts.post_title LIKE '%art%' AND wp_posts.post_title LIKE '%online%' THEN 2 WHEN wp_posts.post_title LIKE '%sword%' OR wp_posts.post_title LIKE '%art%' OR wp_posts.post_title LIKE '%online%' THEN 3 WHEN wp_posts.post_excerpt LIKE '%sword art online%' THEN 4 WHEN wp_posts.post_content LIKE '%sword art online%' THEN 5 ELSE 6 END), wp_posts.post_date DESC
                                                LIMIT 0, 12;
   
   
       SELECT wp_posts.ID
                                FROM wp_posts LEFT JOIN wp_term_relationships tr ON wp_posts.ID = tr.object_id INNER JOIN wp_term_taxonomy tt ON tt.term_taxonomy_id=tr.term_taxonomy_id INNER JOIN wp_terms t ON t.term_id = tt.term_id INNER JOIN wp_postmeta AS unique_postmeta_selector ON (wp_posts.ID = unique_postmeta_selector .post_id)
                                WHERE 1=1 AND ( (unique_postmeta_selector.meta_value LIKE '%Tower %' AND unique_postmeta_selector.meta_key = 'ero_japanese') OR ((wp_posts.post_title LIKE '%Tower%') OR (0 LIKE '%Tower%') OR ( 0 LIKE '%Tower%'))) AND (wp_posts.post_password = '') AND wp_posts.post_type = 'anime' AND ((wp_posts.post_status = 'publish')) OR ((tt.taxonomy = 'post_tag' AND (t.name LIKE '%Tower %' OR t.slug LIKE '%Tower %')) AND wp_posts.post_status = 'publish' AND wp_posts.post_type = 'anime')
                                GROUP BY wp_posts.ID
                                ORDER
       ```
   
 * And in the end i think it’s my theme codding, which may doing that? Can you tell
   me what u think and what we could do to fix this, if the theme’s developer tells
   me it’s not on his side?
    -  This reply was modified 2 years, 4 months ago by [qnkov](https://wordpress.org/support/users/qnkov/).
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/high-cpu-usage-58/#post-17359786)
 * All I can say with the information provided is that the issue definitely doesn’t
   happen in WordPress by itself.
 * That means it’s either caused by your plugins or your theme.
 * The only way to know for sure is to keep all plugins off for the average reproduction
   period. That means, if it takes a day, that you leave all plugins off for a day.
 * If the problem doesn’t return, then one of your plugins is causing it. You’ll
   need to reactivate them individually, a day at a time, until you find the one
   causing the problem.
 * If the problem returns with all plugins off, that means it’s your theme.
 *  Thread Starter [qnkov](https://wordpress.org/support/users/qnkov/)
 * (@qnkov)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/high-cpu-usage-58/#post-17359795)
 * [@macmanx](https://wordpress.org/support/users/macmanx/)
 * I’ve got another respond from the hosting providers:
 * > The case is mostly caused by the “SQL_CALC_FOUND_ROWS” query. I see it used
   > in the following plugins:
   > mycred, ultimate-member, w3-total-cache and wordfence. From these we can exclude(
   > for now) w3-total-cache and wordfence, because many other customers use them
   > and we have not observed a similar case with them.
   > It is quite possible that the case occurs either during higher traffic or during
   > the execution of a certain function. From cPanel -> Resource usage you can 
   > monitor the resources, currently almost none are being used (I guess from the
   > plug-ins being turned off).
   > What I can recommend you is when there is more traffic to turn off the plugins
   > 1 by 1 (by waiting a few minutes) and monitor the resource statistics.
 * What i can say is, that i’m using only Ultimate member last version + wordpress
   last version. I will ask anyway in ultimate member forum, but if you guys can
   give me ideas, im reading.
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/high-cpu-usage-58/#post-17359809)
 * Excellent, noting that thread is at [https://wordpress.org/support/topic/high-cpu-usage-59/](https://wordpress.org/support/topic/high-cpu-usage-59/)

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘High CPU USAGE?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 10 replies
 * 3 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [2 years, 4 months ago](https://wordpress.org/support/topic/high-cpu-usage-58/#post-17359809)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
