• Resolved yoniseo

    (@yoniseo)


    Hi
    I have some websites that host in cloudways, all of them have wordfence and Wprocket
    For some reason it seems that the CPU often reaches to the 100% limit
    I asked for an activity report and it seems that quite a few of the usage conncted to the Wordfence plugin.
    Is there a way to handle these problems?

    ┌──────────────────────────────────────────────────────────┐
    │ Slow Pages                                               │
    ├─────────────────┬─────────────┬──────────┬───────────────┤
    │       URL       │ OCCURRENCES │ MAX TIME │ AVG. DURATION │
    ├─────────────────┼─────────────┼──────────┼───────────────┤
    │ /wp-admin/admin │             │          │               │
    │ -ajax.php?actio │             │          │               │
    │ n=wordfence_doS │             │          │               │
    │ can&isFork=1&sc │             │          │               │
    │ anMode=custom&c │             │          │               │
    │ ronKey=6621a85d │             │          │               │
    │ 60785ea121b3f53 │           1 │  51.582s │       51.582s │
    │ 2df2cb830&signa │             │          │               │
    │ ture=79b1b206ca │             │          │               │
    │ 4f4f6581036b41d │             │          │               │
    │ 6fa6d620001a0bc │             │          │               │
    │ 24e1eeec3085822 │             │          │               │
    │ c51c913ac       │             │          │               │
    │ /wp-admin/admin │             │          │               │
    │ -ajax.php?actio │             │          │               │
    │ n=wordfence_doS │             │          │               │
    │ can&isFork=1&sc │             │          │               │
    │ anMode=custom&c │             │          │               │
    │ ronKey=2f840296 │             │          │               │
    │ e7dda0fda7ab55a │           1 │  50.716s │       50.716s │
    │ b5973ce4e&signa │             │          │               │
    │ ture=fab910b26f │             │          │               │
    │ ea28ee4613e30da │             │          │               │
    │ ad4fe7edffbf992 │             │          │               │
    │ 0e5b6c1cbe27c8f │             │          │               │
    │ 281484774       │             │          │               │
    │ /wp-admin/admin │             │          │               │
    │ -ajax.php?actio │             │          │               │
    │ n=wordfence_doS │             │          │               │
    │ can&isFork=1&sc │             │          │               │
    │ anMode=custom&c │             │          │               │
    │ ronKey=d9652264 │             │          │               │
    │ 8551117a6127ff0 │           1 │  49.766s │       49.766s │
    │ 8daf0b274&signa │             │          │               │
    │ ture=939ae517ef │             │          │               │
    │ 2a4c57cf7cb0c42 │             │          │               │
    │ bd8736ae00b7952 │             │          │               │
    │ 3c7ded5e10cfa8c │             │          │               │
    │ 841b6c845       │             │          │               │
    │ /wp-admin/admin │             │          │               │
    │ -ajax.php?actio │             │          │               │
    │ n=wordfence_doS │             │          │               │
    │ can&isFork=1&sc │             │          │               │
    │ anMode=custom&c │             │          │               │
    │ ronKey=351bfa03 │             │          │               │
    │ 2c3770ffb6ce80b │           1 │  48.250s │       48.250s │
    │ 09ce60245&signa │             │          │               │
    │ ture=032670f862 │             │          │               │
    │ 5cba902923270a9 │             │          │               │
    │ 1929c842b867118 │             │          │               │
    │ 64a1f8978b5a3df │             │          │               │
    │ a477c92d4       │             │          │               │
    │ /wp-admin/admin │             │          │               │
    │ -ajax.php?actio │             │          │               │
    │ n=wordfence_doS │             │          │               │
    │ can&isFork=1&sc │             │          │               │
    │ anMode=custom&c │             │          │               │
    │ ronKey=140ad9f4 │             │          │               │
    │ c946ec0518f0e52 │           1 │  48.055s │       48.055s │
    │ dd0fac081&signa │             │          │               │
    │ ture=70ea90ee99 │             │          │               │
    │ 28cbfb425b3a0fd │             │          │               │
    │ e18a292af23ab6c │             │          │               │
    │ a14e39c7644ead0 │             │          │               │
    │ e76bb8453       │             │          │               │
    │ /wp-admin/admin │             │          │               │
    │ -ajax.php?actio │             │          │               │
    │ n=wordfence_doS │             │          │               │
    │ can&isFork=0&sc │             │          │               │
    │ anMode=custom&c │             │          │               │
    │ ronKey=e847464f │             │          │               │
    │ a067e6aaea57e7e │           1 │  47.604s │       47.604s │
    │ 3e276b275&signa │             │          │               │
    │ ture=09c8c47213 │             │          │               │
    │ ae9f5781bea686d │             │          │               │
    │ 22b100c0dcfa041 │             │          │               │
    │ 99c480e2e21f9b8 │             │          │               │
    │ 27609821a       │             │          │               │
    │ /wp-admin/admin │             │          │               │
    │ -ajax.php?actio │             │          │               │
    │ n=wordfence_doS │             │          │               │
    │ can&isFork=1&sc │             │          │               │
    │ anMode=custom&c │             │          │               │
    │ ronKey=b5f91224 │             │          │               │
    │ bee9360c9593fc0 │           1 │  47.093s │       47.093s │
    │ dacd6d615&signa │             │          │               │
    │ ture=091ed568a6 │             │          │               │
    │ 10fb7c633de36f3 │             │          │               │
    │ 3ad6dbc1e88bbca │             │          │               │
    │ 0d74d644d294e3a │             │          │               │
    │ 020955ee9       │             │          │               │
    │ /wp-admin/admin │             │          │               │
    │ -ajax.php?actio │             │          │               │
    │ n=wordfence_doS │             │          │               │
    │ can&isFork=1&sc │             │          │               │
    │ anMode=custom&c │             │          │               │
    │ ronKey=9af0b9ae │             │          │               │
    │ ffc952babe24dab │           1 │  46.963s │       46.963s │
    │ 9eceb1cd9&signa │             │          │               │
    │ ture=2cd1b603bf │             │          │               │
    │ 9f1697e324c801c │             │          │               │
    │ 1857ed7a785cf99 │             │          │               │
    │ 9f1790bb3d12cbe │             │          │               │
    │ d3fd8d7a5       │             │          │               │
    │ /wp-admin/admin │             │          │               │
    │ -ajax.php?actio │             │          │               │
    │ n=wordfence_doS │             │          │               │
    │ can&isFork=1&sc │             │          │               │
    │ anMode=custom&c │             │          │               │
    │ ronKey=886002fe │             │          │               │
    │ 7f7727f040e6165 │           1 │  46.940s │       46.940s │
    │ c411ff555&signa │             │          │               │
    │ ture=4902b6ef80 │             │          │               │
    │ ef337e2ff58fd01 │             │          │               │
    │ cb857f7969b0d8c │             │          │               │
    │ 42575f98757baf1 │             │          │               │
    │ c096290f6       │             │          │               │
    │ /wp-admin/admin │             │          │               │
    │ -ajax.php?actio │             │          │               │
    │ n=wordfence_doS │             │          │               │
    │ can&isFork=1&sc │             │          │               │
    │ anMode=custom&c │             │          │               │
    │ ronKey=f6e04dbe │             │          │               │
    │ 2401a6aa0cf2bb1 │           1 │  46.909s │       46.909s │
    │ 1c55cf84b&signa │             │          │               │
    │ ture=f70e748589 │             │          │               │
    │ f71b3aa152c4e4e │             │          │               │
    │ a793853dcb97da9 │             │          │               │
    │ 36ea22ca73adeb5 │             │          │               │
    │ 093a20b21       │             │          │               │
    └─────────────────┴─────────────┴──────────┴───────────────┘

    Thanks

Viewing 1 replies (of 1 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @yoniseo, thanks for reaching out.

    If you’re hosted with Cloudways, ensure that your firewall is optimized as we know of cases where optimizing the sometimes-bundled Malcare after Wordfence can re-take control of the auto_prepend_file directive.

    As for high CPU usage, you could also try Wordfence > Scan > Manage Scan > Performance Options > Use low resource scanning, along with setting Maximum execution time for each scan stage, found just below to 20 to see if that helps at all.

    With general performance, Wordfence runs well and unintrusively on the vast majority of ~5m sites it’s installed on despite having to consider many server and plugin/theme combinations. We constantly work on making the plugin faster, perform better, and use less resources but there are not set amounts of RAM, CPU or database queries that we know Wordfence will definitely require in each use-case or hosting environment. The cases of slow-down are small in relation to the quantity of customers using Wordfence, but does crop up from time to time with certain configurations or larger databases/number of installed plugins.

    You could also set max_execution_time = 60 in php.ini, Wordfence’s scan only ever attempts to use half of this value by default.

    Your WP_MEMORY_LIMIT should be set to 128M or 256M in wp-config.php. WooCommerce, for example, recommend 64M minimum, so if you also have many hits on the site at once especially during a Wordfence scan, a lower limit here could be reached fairly easily. Your PHP memory_limit value could also be adjusted to 128M or 256M to accommodate this change.

    Thanks,

    Peter.

Viewing 1 replies (of 1 total)
  • The topic ‘CPU Usage Reaching 100% Limit’ is closed to new replies.