Title: Version 5.2.1 high CPU usage
Last modified: September 15, 2018

---

# Version 5.2.1 high CPU usage

 *  Resolved [tmwnn](https://wordpress.org/support/users/tmwnn/)
 * (@tmwnn)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/)
 * I upgraded to version 5.2.1 this morning and immediately got extremely high CPU
   usage on my server. Downgrading back to 5.1.7 instantly brought CPU usage back
   into the prior range.
 * ![](https://i0.wp.com/s22.postimg.cc/qnk2do6fl/2018-09-15_at_1.53_PM.png?ssl=
   1)
 * I have live update turned off and the high CPU behavior remained the same whether
   the plugin was set to use WordPress native ajax, or the plugin’s ajax.

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

 *  Plugin Author [gVectors Team](https://wordpress.org/support/users/gvectors-team/)
 * (@gvectors-team)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10695188)
 * Please let us know some more information about your comments configuration.
 * 1. How many comment threads are enabled to be loaded at once? That setting is
   located in Dashboard > WordPress Settings > Discussions admin page.
 * [⌊2018-09-17_1513⌉⌊2018-09-17_1513⌉[
 * 2. Have you enabled [“Display only parent comments and view replies ∨ button”](https://wpdiscuz.com/docs/wpdiscuz-documentation/settings/comment-list-settings/#view-replies)
   option in Dashboard > Comments > Settings > Comment List Tab?
 * [⌊2018-09-17_1515⌉⌊2018-09-17_1515⌉[
 * 3. How many comments you have in average for an article?
 * 4. What is your hosting plan?
 * 5. Do you have any wpDiscuz addon installed? Please leave some URL to your website.
    -  This reply was modified 7 years, 8 months ago by [gVectors Team](https://wordpress.org/support/users/gvectors-team/).
 *  Plugin Author [gVectors Team](https://wordpress.org/support/users/gvectors-team/)
 * (@gvectors-team)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10695269)
 * 6. Also please let me know the “Use WordPress native AJAX functions” option is
   enabled or disabled on your website? It’s located in Dashboard > Comments > Settings
   > General Tab.
 * [⌊2018-09-17_1541⌉⌊2018-09-17_1541⌉[
 *  Thread Starter [tmwnn](https://wordpress.org/support/users/tmwnn/)
 * (@tmwnn)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10695273)
 * 1. I do not understand the words of your number 1. I see no preference anywhere,
   either in native wordpress settings or in WPdiscuz that has anything to do with“
   how many comment threads are enabled to be loaded at once”.
 * The setting that you have pictured beneath those words, which to me appears to
   have to do with pagination, is identical on my server to your screenshot. In 
   other words, the option is unchecked and the default value of 50 is in the box
   you have outlined in red.
 * If you are actually asking about the threading levels depth (the setting above
   the one you have outlined in red in your screenshot), we have that set at 7.
 * 2. I do not have the option “Display only parent comments and view replies” enabled.
 * 3. We have a large range of numbers of comments so it would be hard to know the
   average with any accuracy. I would say that the range is from about a dozen on
   the low end up to about 500 on the high end. This site has a very active community
   of commenters.
 * 4. I don’t know what specifically you are asking about the “hosting plan,” but
   this site is running on a custom configured VPN with plenty of resources available.
   The stack is nginx with php 7.2. All software is quite up to date.
 * 5. We have your premium wpDiscuz – Media Uploader addon installed.
 * .
 *  Plugin Author [gVectors Team](https://wordpress.org/support/users/gvectors-team/)
 * (@gvectors-team)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10695300)
 * Thank you [@tmwnn](https://wordpress.org/support/users/tmwnn/)
 * > 2. I do not have the option “Display only parent comments and view replies”
   > enabled.
 * You do have it. Please navigate to Comments >Settings > Comments List Tab and
   find there.
 * > 4. I don’t know what specifically you are asking about the “hosting plan,”
 * I need to see the resources of your hosting plan, like RAM and CPU.
 * > I have downgraded back to version 5.1.7 of wpDiscuz, so I’m not sure what use
   > you would make of a link to the site, but it’s here.
 * The website URL doesn’t work.
 * And please see the #6 question. All Settings of wpDiscuz are located in Comments
   > Settings admin page in according Tabs.
 *  Thread Starter [tmwnn](https://wordpress.org/support/users/tmwnn/)
 * (@tmwnn)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10695459)
 * > 2. I do not have the option “Display only parent comments and view replies”
   > enabled.
   > You do have it. Please navigate to Comments >Settings > Comments List Tab and
   > find there.
 * I did not write that I don’t have it. I wrote that I do not have it ENABLED. 
   In other words, it is DISABLED. Not sure how to communicate that better.
 * The host has 8 GB of ram and 4 CPU cores.
 * 6. Right now (on version 5.1.7), I have the wpDiscuz set to use its own ajax.
   As I wrote in my initial post, just a few inches above these words, when I tried
   version 5.2.1, I tried it both ways and saw the same high CPU usage either way.
   I cleared all caches between settings changes.
 * To be as clear as I can: version 5.1.7 does not have any problem. Version 5.2.1
   uses a lot of the CPU resources on the server.
 * Sorry about the broken link: [Here it is again](https://www.theburningplatform.com).
 *  [Jon Brown](https://wordpress.org/support/users/jb510/)
 * (@jb510)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10715820)
 * Not trying to hijack tmwnn’s thread, but had the exact same experience. After
   updating from 5.1 to 5.2 it crashed our server after a few hours, 5x normal CPU/
   MySQL load.
 * MySQL was getting hammered with
 * 642959 s1 localhost s1 Query 0 Sending data SELECT `c`.`comment_ID` FROM (SELECT`
   comment_ID`, `comment_parent`, `comment_ap
    proved`FROM`wp_comments`)`c`, (SELECT
   [@pv](https://wordpress.org/support/users/pv/) := (‘2445634,2442668,2441875,2441540,2440599,2438161,2437894,2436630,2434857,2434041,2434040,2434039,243403
   7,2432060,2431431,2431392,2429967,2429236,2428073,2422908,2422684,2419670,2411671,2411347,2410002’))
   AS `init` WHERE FIND_IN_SET(`c`.`comment_parent`, @ pv) AND LENGTH(@pv := CONCAT(
   @pv, ‘,’, `c`.`comment_ID`)) AND `c`.`comment_approved` = 1 0 0 642964 s1 localhost
   s1 Query 0 Sending data SELECT `c`.`comment_ID` FROM (SELECT `comment_ID`, `comment_parent`,`
   comment_ap proved`FROM`wp_comments`)`c`, (SELECT [@pv](https://wordpress.org/support/users/pv/):
   = (‘938906,638557,363746,331769,143613,131184,94437,88919,88400,80094,77489,76905,76301,76152,75998,75928,
   75739,75737’)) AS `init` WHERE FIND_IN_SET(`c`.`comment_parent`, [@pv](https://wordpress.org/support/users/pv/))
   AND LENGTH(@pv := CONCAT(@pv, ‘,’, `c`.`comment_ID`)) AND `c`.`comment_approved`
   = 1 0 0 642967 s1 localhost s1 Query 0 Sending data SELECT `c`.`comment_ID` FROM(
   SELECT `comment_ID`, `comment_parent`, `comment_ap proved`FROM`wp_comments`)`
   c`, (SELECT @pv := ('2445928,2385794')) AS`init`WHERE FIND_IN_SET(`c`.`comment_parent`,
   [@pv](https://wordpress.org/support/users/pv/)) AND LENGTH(@pv := CONCAT(@pv ,‘,’,`
   c`.`comment_ID`)) AND `c`.`comment_approved` = 1 0 0
 * I rolled back to 5.1.7. Now works fine, no load spike, no evidence of these specific
   queries happening at all
 * FYI, (note these are screenshots of 5.1.7, but no settings changes were made)
   
   1. [https://cloudup.com/cJfv4wGrBM1](https://cloudup.com/cJfv4wGrBM1)
 * 2. See screenshot above (not set to display only parent)
 * 3. Similar to tmwnn – mostly 10-50 comments, a few that are in the hundreds.
 * 4. 8GB, I forget cores, but it’ a well provisioned VPS running varnish and redis.
 * 5. no addons
 * 6. I’m certain this is/was set to use WP Discuz’s custom handler, not default
   WP.
 *  Thread Starter [tmwnn](https://wordpress.org/support/users/tmwnn/)
 * (@tmwnn)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10717575)
 * [@jb510](https://wordpress.org/support/users/jb510/) that’s no hijacking, that’s
   adding valuable information. Thank you.
 * I also saw on my server that 5.2.1 was hitting the DB hard and that most of the
   increase in CPU usage was tied to I/O, but I didn’t have time to look up the 
   query.
 * The release notes for version 5.2.X of wpDiscuz specifically mention:
    - Boosted: Revolutionary changes in core made for rocket speed.
    - Boosted: Database queries with custom AJAX processor (disabled by default)
 * I’m assuming that what we are seeing is some unintended side effect of the second
   one.
 * Edit: …though I also still got high CPU usage when I switched the plugin setting
   to wordpress native ajax, so maybe it’s the first one?
 *  [suprim](https://wordpress.org/support/users/suprim/)
 * (@suprim)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10749856)
 * [@tmwnn](https://wordpress.org/support/users/tmwnn/) Did you fix the issue? I
   am also having the same issue with CPU even with 16gb my DB stops working.
 *  Thread Starter [tmwnn](https://wordpress.org/support/users/tmwnn/)
 * (@tmwnn)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10749876)
 * [@suprim](https://wordpress.org/support/users/suprim/) No, I’ve just downgraded
   indefinitely to version 5.1.7. I hope that at some point the developers will 
   address it and update the plugin.
 *  [suprim](https://wordpress.org/support/users/suprim/)
 * (@suprim)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10749937)
 * [@tmwnn](https://wordpress.org/support/users/tmwnn/) Thank you for quick answer.
   Yeah I will do same, I had no idea it had to do with wpdiscuz with my CPU over
   usage.
 *  Plugin Support [gVectors Support](https://wordpress.org/support/users/gvectorssupport/)
 * (@gvectorssupport)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10755524)
 * Hi [@tmwnn](https://wordpress.org/support/users/tmwnn/), [@suprim](https://wordpress.org/support/users/suprim/),
   [@jb510](https://wordpress.org/support/users/jb510/),
 * We’ve released the wpDiscuz new version (v5.2.2). Please update wpDiscuz to the
   latest version and check again.
 *  [suprim](https://wordpress.org/support/users/suprim/)
 * (@suprim)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10755914)
 * Still getting the issue when the traffic is high so downgraded to v 5.1.7
 * You can see in below image as my traffic increased the cpu load started to increase
   as well it went up from 2gb to 10gb. As soon as I downgraded to 5.1.7 and cache
   delete everything went normal.
 * > [View post on imgur.com](https://imgur.com/2oJc5Il)
    -  This reply was modified 7 years, 7 months ago by [suprim](https://wordpress.org/support/users/suprim/).
    -  This reply was modified 7 years, 7 months ago by [suprim](https://wordpress.org/support/users/suprim/).
 *  Plugin Support [gVectors Support](https://wordpress.org/support/users/gvectorssupport/)
 * (@gvectorssupport)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10774647)
 * Hi [@suprim](https://wordpress.org/support/users/suprim/),
 * Have you deleted the caches after updating to the latest version (v5.2.2)?
 *  [Jon Brown](https://wordpress.org/support/users/jb510/)
 * (@jb510)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10791204)
 * Finally had a test window where I could safely try this. After a few hours, with
   5.2.2 I’m not seeing any load (CPU or MySQL) increase from 5.1.7.
 * Leaving on…
 *  Thread Starter [tmwnn](https://wordpress.org/support/users/tmwnn/)
 * (@tmwnn)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10792728)
 * Yup, same here. 5.2.2 looks good on my box. I am running the plugin’s (not WP’s)
   ajax code.
 * ![](https://i0.wp.com/i.postimg.cc/28RhPdXz/2018-10-18-at-8-45-AM.png?ssl=1)
 * Marking this issue resolved.

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

The topic ‘Version 5.2.1 high CPU usage’ is closed to new replies.

 * ![](https://ps.w.org/wpdiscuz/assets/icon-256x256.png?rev=1076265)
 * [Comments - wpDiscuz](https://wordpress.org/plugins/wpdiscuz/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpdiscuz/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpdiscuz/)
 * [Active Topics](https://wordpress.org/support/plugin/wpdiscuz/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpdiscuz/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpdiscuz/reviews/)

 * 15 replies
 * 5 participants
 * Last reply from: [tmwnn](https://wordpress.org/support/users/tmwnn/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/version-5-2-1-high-cpu-usage/#post-10792728)
 * Status: resolved