Support » Plugin: Wordfence Security - Firewall & Malware Scan » Scan runs into a fatal memory error?

  • Resolved scifiwriter


    My site has been running with no wordfence issues for a long time.
    I logged onto my site this morning and found the wordfence scan had errored out…
    [Dec 01 08:22:25] Fatal error: Out of memory (allocated 221249536) (tried to allocate 31457280 bytes) in /hermes/bosnaweb16a/b1585/{WEBSITE}/wp-content/plugins/wordfence/lib/wfConfig.php on line 530

    I obscured my provider {WEBSITE} specific info.

    I had set the settings to request 300MB in settings a long time ago.

    I immediately contacted my hosting provider. They set my site up to the max and I still got the same error. They set WordPress memory to its max. I still got the same error.

    I have done nothing on this site for a few weeks other than to sign in and check on things. It has run with no issues until today.

    I am not real website-savvy so your kind help is greatly appreciated.

Viewing 15 replies - 1 through 15 (of 23 total)
  • I am running into the same issue. It is hitting a 256m0b ceiling when trying to do a scan.

    Edit: I did try playing around with the memory setting limit within the options area to try to set the ceiling lower.

    • This reply was modified 2 years, 3 months ago by  WP CMS Ninja. Reason: added options update

    I set the memory 1st down to 200MB, then down 128 MB. Then tried to scan. Neither adjustment changed anything.

    I set wordfence to use a low resource scan and that did not change anything.

    I am perplexed. Why has this worked perfectly until today? Why is today different?

    Same problem for me. All my sites are failing to scan with a fatal error because the allowed memory of 256mb has been exhausted. No change after today’s update.

    Okay. I am a crazy man. I went back to my website just now and found that it scheduled and ran a scan just fine!!!!! I do have it set to do low resource scans, but come on. I tried this before and it didn’t work. What happened? I haven’t really done anything.

    I am really not at all that website savvy, but now I am even more perplexed. I am going to leave this topic open, and hopefully someone can explain what happened before this comes back around to bite me in the butt.

    Oh. PS. Then don’t I get notified that there is a update to WordFence that I need to approve. I went to my site and updated the WordFence Plugin. Does this have to do with the Firefox zero-day maleware they found yesterday? OR EVEN SCARIER maybe it cures fatal memory errors?

    Thank you all for your continued support. I really do appreciate all the kind advice that is offered here.

    I have even done the Low Resource check box and set to 128mb and I am still getting the 256mb limit reached.



    Same here…I have seen that this very issue has happened in the past, there are posts here reporting the same issue with WF since 2013. Some of the tech guys at WF suggested it could be due to PHP version at your host. Mine is 5.4.45. Pls what is yours? so that we can perphaps rule out or confirm that might be the case.


    5.4.45 as well but the scans were working fine up about a month ago.



    That is my case too…

    How do I find out my host’s php version?

    Inside the wordfence menu there is a diagnostic selection. It will have the information there.

    I have the same problem as the OP, in both my sites.
    Also I have 5.3.28 PHP installed

    Moderator t-p



    If the troubleshooting already posted made no difference for you, then, as per the Forum Welcome, please post your own topic.



    Which troubleshootng? we still have no idea why this is happening! In fact, I expected some WF tech support voice here to help!

    Same issues as everyone else here.
    Tried “low resource scanning” setting, various memory limits in WF options – nothing worked.
    This seems to have started with version 6.2.5, same error with 6.2.6 and 6.2.7

    Only way I can get it to successfully scan is by increasing PHP memory limit to something above 256M

    PHP 5.5.36

    memory_limit = 128M (Host Default setting and the Maximum they recommend.)
    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 8388608 bytes)

    memory_limit = 256M
    Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 8388608 bytes)

    memory_limit = 512M
    Wordfence used 172.12MB of memory for scan. Server peak memory usage was: 222.02MB

    memory_limit = 384M
    Wordfence used 159.17MB of memory for scan. Server peak memory usage was: 209.26MB

    memory_limit = 268M (Lowest setting I tried that would scan without error.)
    Wordfence used 159.16MB of memory for scan. Server peak memory usage was: 209.25MB

    Unfortunately not every host I deal with allows access to change the PHP memory limit.



    Thanks grogwort, yes, my host does not allow to allocate more that 256M to PHP memory limit. For that, one should go for VPS. I hope this is something WF can get fixed in its next version 🙁

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Scan runs into a fatal memory error?’ is closed to new replies.