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.
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.
-
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.
2. Have you enabled “Display only parent comments and view replies ∨ button” option in Dashboard > Comments > Settings > Comment List Tab?
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 6 years, 5 months ago by
gVectors Team.
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.
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.
Thank you @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.
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.
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 (SELECTcomment_ID
,comment_parent
, `comment_ap
provedFROM
wp_comments)
c`, (SELECT @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’)) ASinit
WHERE FIND_IN_SET(c
.comment_parent
, @
pv) AND LENGTH(@pv := CONCAT(@pv, ‘,’,c
.comment_ID
)) ANDc
.comment_approved
= 1 0 0
642964 s1 localhost s1 Query 0 Sending data SELECTc
.comment_ID
FROM (SELECTcomment_ID
,comment_parent
, `comment_ap
provedFROM
wp_comments)
c`, (SELECT @pv := (‘938906,638557,363746,331769,143613,131184,94437,88919,88400,80094,77489,76905,76301,76152,75998,75928,
75739,75737’)) ASinit
WHERE FIND_IN_SET(c
.comment_parent
, @pv) AND LENGTH(@pv := CONCAT(@pv, ‘,’,c
.comment_ID
)) ANDc
.comment_approved
=
1 0 0
642967 s1 localhost s1 Query 0 Sending data SELECTc
.comment_ID
FROM (SELECTcomment_ID
,comment_parent
, `comment_ap
provedFROM
wp_comments)
c, (SELECT @pv := ('2445928,2385794')) AS
initWHERE FIND_IN_SET(
c.
comment_parent`, @pv) AND LENGTH(@pv := CONCAT(@pv
, ‘,’,c
.comment_ID
)) ANDc
.comment_approved
= 1 0 0I 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/cJfv4wGrBM12. 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.
@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?
@tmwnn Did you fix the issue? I am also having the same issue with CPU even with 16gb my DB stops working.
@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.
@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.
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.
Hi @suprim,
Have you deleted the caches after updating to the latest version (v5.2.2)?
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…
Yup, same here. 5.2.2 looks good on my box. I am running the plugin’s (not WP’s) ajax code.
Marking this issue resolved.
-
This reply was modified 6 years, 5 months ago by
- The topic ‘Version 5.2.1 high CPU usage’ is closed to new replies.