• Resolved chrisgbydesign

    (@chrisgbydesign)


    Hello there!

    I am using free Wordfence on a client’s site which has slowed down considerably and using all resources (and therefore freezing the site). Before this, however, there were often issues with json that stopped posts saving and other gremlins like that. Sometimes, saving Permalinks and refreshing the htaccess seemed to help.

    For a while, however, I’ve noticed the Rest API not working (in Site Health). Rest API and Loopback wasn’t working. I finally found that it is perfectly okay if I deactivate Wordfence. I reactivated Wordfence to check for any logs (so that I could reconfigure anything) and found this in diagnostics:

    “Connecting back to this site via IPv6 (not required; failure to connect may not be an issue on some sites) (opens in new tab)

    wp_remote_post() test back to this server failed! Response was: cURL error 7:”

    The Rest API and the Json issue had been present on the site when it was on another server and on this one (migrated last week and DNS changed). But the site has really slowed down and using high resources since DNS changed…so some of that might be bot traffic.

    Or, is this rest api causing a high resource issue? And do you have ideas on how I can fix this, please? I’d like to keep Wordfence.

    I should mention that I have a copy of this site on the same server as it is now, but in a staging cPanel account…Wordfence is installed and it has no Rest API error. I can’t find the common variable, I’m stumped.

    Thanks

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support wfpeter

    (@wfpeter)

    Hi @chrisgbydesign, thanks for your detailed message.

    The IPv6 connectivity error is totally normal to see when, software such as Cloudflare (as one example) assigns an IPv6 address to your site but your host doesn’t give you an IPv6 address. If you have IPv4 connectivity errors too, that would need to be resolved to ensure scans and rules updates are able to connect into our servers and back to your site.

    Our free product Wordfence Central requires the REST API to connect to customer sites, so the Wordfence plugin doesn’t disable this.

    There are considerations in our docs around noabort code on Litespeed and allowlisting IPs in Cloudflare, so the environment and server platform/APIs can make a difference to speed especially on shared servers. I’m just mentioning that for reference as I can’t see your server platform or software.

    Check if max_execution_time = 60 is set in php.ini. Wordfence’s scan only ever attempts to use half of this value by default but there have been known problems with higher values than 60 being set.

    For a screenshot of my recommended Performance settings inside the plugin too – Click Here.

    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 (like 40M commonly seen here) could be reached fairly easily. Your php.ini memory_limit value could also be adjusted to match the value you decide on for the WP setting.

    With general performance, 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, larger databases, and/or a higher number of installed plugins.

    Thanks,
    Peter.

    Brian

    (@88supernova88)

    Good day,

    I am having the same issue as described by @chrisgbydesign. I have followed your advice above, and have corrected my php.ini and wp-config settings accordingly. I do have not have any caching plugins installed.

    Disabling WordFence solves the 2 problems shown below:

    1.

    When testing the REST API, an unexpected result was returned:

    REST API Endpoint: https://supervape.co.za/wp-json/wp/v2/types/post?context=edit
    REST API Response: (503) Service Unavailable

    2.

    Unable to detect page cache due to possible loopback request problem. Please verify that the loopback request test is passing. Error: Service Unavailable (Code: http_503)

    I am running the latest version of WordFence 7.11.0.

    Thank you.

    Brian

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

The topic ‘Wordfence disabled Rest api’ is closed to new replies.