• I’m trying to find out if Wordfence is the cause of my CPU and I/O usage spikes? They both spike on a rhythmic pattern. Like every 4-6 hours or so. I also read some where that someone found code in the config file about W3TC plugin. I’m not sure if this is what they were talking about:

    /** Enable W3 Total Cache Edge Mode */
    define(‘W3TC_EDGE_MODE’, true); // Added by W3 Total Cache

    But I removed that… No I’m waiting to see if this fixes things… of course I’ve already deleted W3 because it caused too many problems on my site. This has been really frustrating.

    I pay for wordfence so I would had to lose it. I think it is great. I also don’t us the live view or what ever and I even tried scheduling scans so they weren’t happening so frequently. However, I’m not sure that worked just yet. I think there could be some conflicting code or something. I’m not sure…

    Any advice?

    I’m not sure how long these spikes have been happening as I just found out how to check it. I am also on a shared server unfortunately and use Godaddy, but even they said it is higher than normal.

    I just started using Quick cache to see if that helps. Not sure yet on that either. QC seems to be more compatible than W3TC though.

    I think next I will try my plugins, but I already removed all the intrusive ones. The big ones are like WP SEO and My thrive content editor. Oh and wordfence of course.

    I will then try switching themes to see if that helps.

    I do have 4 wordpress sites all together but they are all small in traffic. No more than 50 -70 visitors a day from all 4.

    https://wordpress.org/plugins/wordfence/

Viewing 13 replies - 1 through 13 (of 13 total)
  • Hi

    Can you look at your scan schedule and see if those times coincide with the spikes?

    tim

    Thread Starter rcuringt

    (@rcuringt)

    I checked. Honestly it is hard to tell. If wordefence is as you say then I don’t think its the problem. I’m still trying to get to the bottom of these I/O spikes and CPU usage.

    I did find out that whenever I sit on the scan screen in WP an Ajax file is repeatedly execute and the runs up my usage. So I don’t stay inside the editing files long while editing WP.

    Here is something that I thought was an issue. Perhaps you can confirm. When I click scan from wordfence menu in WP. I see the loading bars moving continuously and nothing happening in terms of files being scanned. However, I learned that may in fact be how WF is suppose to work.

    Back to my usage and I/O spikes… I actually think the problem can be linked to spam attacks and hackers hitting my site. They kept triggering my WP-cron.php. So I disabled it in wp-config.php. Now I don’t think my scehduled scans work in wordfence any more. nor my back ups from another plugin. However Can’t I create a cron job in my cpanel to fire up my stored Wordfence scans?

    The linked site is what I thought my issue was. Just wondering if this cron job gets WF to do its normal scan.
    http://stickystatic.com/tech/disable-wordpress-cron-jobs

    Thread Starter rcuringt

    (@rcuringt)

    Also…

    It looks as if some Countries I’ve blocked are still managing to access my site. I’m not sure but perhaps you can tell me why I’m seeing various “GET strings from IP addresses in countries that I have blocked (login form and rest of site) in my raw access files. Thank you.

    Such as…
    “GET / HTTP/1.1”
    “GET / webmanage
    “GET / Admin

    What’s the code they get back?

    tim

    Thread Starter rcuringt

    (@rcuringt)

    sorry…I’m not sure what your asking.

    There will be a response code that you see. Like 404 or 503 or 200. If you copy the entire entry in the log I can show you

    Tim

    Thread Starter rcuringt

    (@rcuringt)

    You mean the examples I started typing out above? Starting with “Get? I just copy the whole line and past it in my browser? Show me please

    Thread Starter rcuringt

    (@rcuringt)

    Oh your talking about the service code I see right after the http.

    Like something like thess:
    “GET /wp-login.php?action=register HTTP/1.1” 503 2333
    “POST /wp-login.php HTTP/1.1” 503 2333
    /wp-login.php HTTP/1.0″ 200 2987 “-” “-“

    So the first example returns a 503 which means it was successfully blocked right? and the 200 means I need to go in and block their IP address right?

    What if I decide to block their country. Then I don’t need to worry about blocking an individual IP correct? I think I sill would have to add their individual IP because on the country settings I’m only blocking backend access. I need to add their individual ID to block front end access as well correct? Or Does WF even block front end Access?

    And I know this post was originally for CPU spikes. I think I was able to fix that and I don’t believe WF was at fault.

    But my last question is WF still allows for our own servers to use resources even when 404 or 503s are returned correct?

    On the country blocking page you can block either the login or the public site or both. I prefer redirecting them somewhere else 🙂

    tim

    Thread Starter rcuringt

    (@rcuringt)

    Hi Tim thanks for responding to many requests today. Even from other people… However you are not answering my questions. I know I can use country blocking. Let me try to be a bit more specific and then I will close or resolve this post.

    1st: Was I correct about the response codes?

    2nd: If a country is blocked (premium member) do I need to worry about blociking an individual IP address if that IP address is from that blocked country?

    3rd: Is there currently a way to block all backend users and only certain front end users… like IQ country (plugin) does? The current set up is you are unable to destinguish between both back end and front end.

    4th: I added this question: Can I now use IQ country (plugin) with Wordfence without any conflicts?

    1. Yes. A 503 says they were blocked. A 200 is a success

    2. If you block the country it blocks the ip addresses from that country so Jo need to block in two places

    3. The country blocking allows you to block the countries either from just the public side or the login page. Or you can choose both. It’s up to you but it’s not a question of blocking countries a, b, and c from the public side and blocking countries b, c, and d from the backend.

    4. I don’t manage their plugins I can’t say whether their code is WordPress standards complient. You can certainly try but if you did, I would not use the functions that we do.

    Does that help answer your questions?

    Tim

    Thread Starter rcuringt

    (@rcuringt)

    Yes that helps very much.. thank you Tim… perhaps for my question in 3 that you recommend the option to distinguish between blocking from fronend and backend. For example. I may want to block all backend countries. All attempts basically except for my IP address. However, on the front end if I did that I would lock all my visitors from seening my site.

    So, There would only be like 15-20 countries I would want to block from front end and everyone from backend …

    Does that make sense. Currently WF cannot do that. Or is there a way? Anyway. thanks for all your help today.

    Perhaps this page will help you understand better

    http://docs.wordfence.com/en/Country_blocking

    Tim

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

The topic ‘CPU usage spikes – Is it Wordfence?’ is closed to new replies.