• Resolved soupmagnet

    (@soupmagnet)


    I have a live website on which we’re trying to run a Wordfence scan, but the scan keeps failing due to it exceeding the available memory. The website is on a dedicated server with 3GB of RAM. When we first ran into the problem, I noticed that the PHP memory limit was set to 32MB, so we increased it to 96MB and set Wordfence to “Use low resource scanning”. When the scan failed again for the same reason, we increased the PHP memory limit to 128MB, 256MB, and so on, and so forth. Ultimately, it took setting the PHP memory limit to something ridiculous, 768MB, before the scan would complete without running out of memory.

    As far as the scan options, all are enabled except for the following…
    * Scan theme files against repository versions for changes
    * Scan plugin files against repository versions for changes
    * Scan files outside your WordPress installation
    * Scan images, binary, and other files as if they were executable

    And here is an export of all of the Wordfence settings for reference
    1e1c8b7401fb4e374144f3c399755887553efcbc8192c02576803a91862f733def5420c685f8b5542b87ca486b05b273509cb70a4e5192a8065baa3c8ec490dde000d6c648c23826272058a3381c0ab5

    My question is, why is Wordfence using so much memory for a simple scan, and when set to use low resource scanning? I’ve used these same settings for probably a hundred other WordPress websites and none have even come close to needing that much memory for a Wordfence scan. So, what’s the deal? What is is about this particular site that is so troublesome? What causes a scan to use up that much memory when just scanning WordPress itself and not scanning any images as if they were executable? It doesn’t make sense.

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

    (@wfscott)

    Hello, @soupmagnet

    Thanks for reaching out.

    Can you please send diagnostics from the Wordfence > Tools > Diagnostics page via the Send Report by Email button to wftest at wordfence dot com? Please put your forum username in the appropriate field there as well.

    Let me know here when those are sent.

    256MB is generally what we recommend using, though it is not completely uncommon to need to use 512MB or more for sites running a larger number of plugins. One thing to keep in mind is it is not likely that Wordfence is using all the memory, but rather all the plugins active at any given time, or potentially one or two problematic or conflicting plugins.

    One thing to do is to go through all your plugins and make sure you are actually using all of them. Every plugin you have activated uses a part of your available memory, so the more plugins you have active, the more memory your site needs.

    After you send the diagnostics, please go to the Wordfence > Tools > Other Tests area and run the Test your WordPress host’s available memory test there. Copy the output of that and paste it into an email to wftest at wordfence dot com and put your forum username as the subject line for that email.

    Let me know here when those are sent and I’ll take a look for you.

    Thanks,
    Scott

    Plugin Support wfscott

    (@wfscott)

    As I haven’t heard back from you I am marking the ticket as resolved.

    If you are still experiencing this issue and it is not resolved please respond to the post and mark this topic as “not resolved” and I’ll be happy to take another look for you.

    Thanks,
    Scott

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘PHP Out of memory when running a scan’ is closed to new replies.