• Resolved gbeddow

    (@gbeddow)


    I’ve been getting a Wordfence error for a little over a month:

    “The last rules update for the Wordfence Web Application Firewall was unsuccessful. The last successful update check was February 13, 2023 3:25 pm, so this site may be missing new rules added since then. You may wait for the next automatic attempt at March 27, 2023 4:53 pm or try to Manually Update by clicking the “Manually Refresh Rules” button below the Rules list.”

    It’s not providing any indication of what the problem is. I haven’t changed any settings in a long time, and I can’t even manually update the Wordfence rules.

    Any idea how to resolve this?

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

    (@wfpeter)

    Hi @gbeddow, thanks for getting in touch!

    If you’re not seeing permission failures to either your database or files reported on your Wordfence > Tools > Diagnostics page, I would try navigating to your wp-content/wflogs folder via FTP or file manager. You should be able to delete the wflogs folder or its contents entirely and Wordfence should try to repopulate it within 30 minutes.

    It’s also worth checking that in addition to 755 permissions on your WordPress site’s directories, the process owner is also www-data.

    If you experience persistent problems with the rules.php file, you can bypass this entirely by setting Wordfence to write to the MySQLi storage engine instead of a file: https://www.wordfence.com/help/firewall/mysqli-storage-engine/

    Thanks,
    Peter.

    Thread Starter gbeddow

    (@gbeddow)

    Thanks @wfpeter . Deleting the wflogs folder made the Wordfence error message go away, but manually updating the rules failed because it thought it had exceeded a maximum number of manual updates. Maybe it will start working normally again now, we’ll see.

    Thread Starter gbeddow

    (@gbeddow)

    @wfpeter One unfortunate side-effect of this is that my site is now often very slow. So slow, in fact, I’ve had to temporarily disable Wordfence altogether, not a good state of affairs.

    Thread Starter gbeddow

    (@gbeddow)

    Possible clue:

    # cat /data/logs/bluenote9.com-error.log

    [Sat Mar 25 07:51:54.039740 2023] [:error] [pid 24744] [client 192.168.1.1:57314] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /data/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/utils.php on line 479

    Thread Starter gbeddow

    (@gbeddow)

    @wfpeter any progress on this? Does a fix need to happen in Wordfence, or is there something more I can do on my side?

    Plugin Support wfpeter

    (@wfpeter)

    Hi @gbeddow, thanks for the extra detail.

    The error message of 30 seconds sounds correct for our settings as Wordfence only ever attempts to use half of our recommended value of 60. Check max_execution_time = 60 in php.ini.

    For a screenshot of my recommended Performance setting options 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 memory_limit value could also be adjusted to match the above value.

    Finally, I have seen the specific error message you mention remedied before when turning off Wordfence > All Options > Scan Options > Scan for publicly accessible quarantined files, and/or Scan file contents for backdoors, trojans and suspicious code. Give one of those a try, then the other, then both together.

    Thanks again,
    Peter.

    Thread Starter gbeddow

    (@gbeddow)

    @wfpeter Any other ideas? I tried all those and the site still hangs intermittently for > 30 seconds.

    Another idea: Over the past ~6 years I’ve manually blocked a large number of IPs for making failed login attempts, etc. Is it possible Wordfence is slowing down as a result?

    Thread Starter gbeddow

    (@gbeddow)

    @wfpeter are you sure there isn’t a bug somewhere in Wordfence?

    Every time it hangs there’s a timeout error in different places in the Wordfence code – and no errors anywhere else. Here’s another one just as a data point:

    [Tue Mar 28 14:38:40.279739 2023] [:error] [pid 23167] [client 192.168.1.1:64292] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /data/public_html/wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/parser/lexer.php on line 672

    Thread Starter gbeddow

    (@gbeddow)

    @wfpeter any word on a fix for this? Since it started my site availability according to Site24x7.com has dropped from 100% to less than 15%, so I’m about to pull the plug on Wordfence.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘rules not updating’ is closed to new replies.