• Im running latest version of wordpress.
    Since I moved the website to new server and upgraded to latest WP, I see a weird issue.

    the CPU usage is close to 100% most of the time.
    Frontend works perfectly fine.
    but backend each page load almost takes 30-40 seconds.

    I installed MEMORY CHECKER plugin and found this query taking time :

    Query: SELECT comment_approved, COUNT( * ) AS total FROM wp_comments GROUP BY comment_approved
    Time it took query to run: 6.103515625E-5
    The function that called the query: require_once(‘wp-admin/admin.php’), require(‘wp-admin/menu.php’), wp_count_comments, get_comment_count, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection_QueryCaching->query, W3TC\_CallUnderlying->query, W3TC\DbCache_Wpdb->query, W3TC\DbCache_WpdbInjection->query, W3TC\DbCache_Wpdb->default_query

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello soamz,
    I have seen this type of error many times after a website migration. Since your error mentions W3 Total Cache (W3TC\DbCache) five times, I recommend clearing the cache, or reinstalling the plugin.
    Cheers,
    John-Paul

    Thread Starter soamz

    (@soamz)

    I have removed w3 total cache and then installed it again too.

    Still the same,
    https://prntscr.com/fjqoev

    Thread Starter soamz

    (@soamz)

    https://prntscr.com/fjyiga

    You can see what cloud linux team replied on their investigation

    Thread Starter soamz

    (@soamz)

    Also, I’ve checked LVE statistics for the mentioned user:
    # lveinfo –period=1d –by-fault=any -u jetspot
    +———–+———–+—-+—-+—-+—+—+—+——+——+—–+—–+—+—–+—–+——+——+——+——+—–+——+—–+——+——+—–+—–+—–+
    | From | To |aCPU|mCPU|lCPU|aEP|mEP|lEP|aVMem |mVMem |lVMem|VMemF|EPf|aPMem|mPMem|lPMem |aNproc|mNproc|lNproc|PMemF|NprocF| aIO | mIO | lIO |aIOPS|mIOPS|lIOPS|
    +———–+———–+—-+—-+—-+—+—+—+——+——+—–+—–+—+—–+—–+——+——+——+——+—–+——+—–+——+——+—–+—–+—–+
    |06-14 09:51|06-14 09:52|115 |115 |400 |6 |6 |100|654MB |654MB |0B |0 |0 |811MB|811MB|16.0GB|6 |6 |100 |0 |0 |4.1MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 09:56|06-14 09:57|93 |93 |400 |5 |5 |100|763MB |763MB |0B |0 |0 |918MB|918MB|16.0GB|5 |5 |100 |0 |0 |1.6MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 10:16|06-14 10:17|169 |169 |400 |8 |8 |100|1.2GB |1.2GB |0B |0 |0 |1.3GB|1.3GB|16.0GB|8 |8 |100 |0 |0 |5.8MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 10:24|06-14 10:25|127 |400 |400 |5 |5 |100|796MB |796MB |0B |0 |0 |936MB|936MB|16.0GB|5 |5 |100 |0 |0 |2.7MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 10:46|06-14 10:47|130 |130 |400 |4 |4 |100|401MB |401MB |0B |0 |0 |554MB|554MB|16.0GB|4 |4 |100 |0 |0 |2.9MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 11:16|06-14 11:17|14 |14 |400 |1 |1 |100|98.0MB|98.0MB|0B |0 |0 |285MB|285MB|16.0GB|1 |1 |100 |0 |0 |3.8MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 11:25|06-14 11:26|113 |113 |400 |7 |7 |100|823MB |823MB |0B |0 |0 |963MB|963MB|16.0GB|7 |7 |100 |0 |0 |2.2MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 11:39|06-14 11:40|125 |125 |400 |6 |6 |100|891MB |891MB |0B |0 |0 |1.0GB|1.0GB|16.0GB|6 |6 |100 |0 |0 |4.7MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 11:54|06-14 11:55|122 |122 |400 |6 |6 |100|779MB |779MB |0B |0 |0 |939MB|939MB|16.0GB|6 |6 |100 |0 |0 |1.8MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 12:07|06-14 12:08|8 |8 |400 |1 |1 |100|80.2MB|80.2MB|0B |0 |0 |259MB|259MB|16.0GB|1 |1 |100 |0 |0 |4.6MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 12:11|06-14 12:12|77 |77 |400 |2 |2 |100|240MB |240MB |0B |0 |0 |418MB|418MB|16.0GB|2 |2 |100 |0 |0 |7.9MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 12:12|06-14 12:13|66 |66 |400 |2 |2 |100|191MB |191MB |0B |0 |0 |379MB|379MB|16.0GB|2 |2 |100 |0 |0 |5.0MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 12:17|06-14 12:18|10 |10 |400 |3 |3 |100|111MB |111MB |0B |0 |0 |295MB|295MB|16.0GB|1 |1 |100 |0 |0 |2.9MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 12:23|06-14 12:24|8 |8 |400 |1 |1 |100|80.6MB|80.6MB|0B |0 |0 |252MB|252MB|16.0GB|1 |1 |100 |0 |0 |1.6MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 12:26|06-14 12:27|13 |13 |400 |1 |1 |100|103MB |103MB |0B |0 |0 |286MB|286MB|16.0GB|1 |1 |100 |0 |0 |1.6MB|10.0MB|10.0MB|0 |0 |1.0K |
    |06-14 12:54|06-14 12:55|111 |400 |400 |3 |3 |100|296MB |296MB |0B |0 |0 |463MB|463MB|16.0GB|3 |3 |100 |0 |0 |0B |0B |10.0MB|0 |0 |1.0K |
    +———–+———–+—-+—-+—-+—+—+—+——+——+—–+—–+—+—–+—–+——+——+——+——+—–+——+—–+——+——+—–+—–+—–+

    As you can see, this user is reaching often LVE IO limit and sometimes SPEED (cpu) limit and has the high PMEM usage. To get more detail info about the reasons you need to check/analyze the user’ processes, LVE snapshots (if you’re using it), his sites configuration etc.

    Kindly let me know if there is something else I can help you with.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘High CPU Usage on WordPress by this query ?’ is closed to new replies.