Support » Plugin: Wordfence Security - Firewall & Malware Scan » Memory benchmarking utility

  • Resolved saowp

    (@saowp)


    I have installed WordFence on two separate sites. I ran the Wordfence Memory benchmarking utility on both sites, and got different results

    Site 1

    Wordfence Memory benchmarking utility version 7.4.1.
    This utility tests if your WordPress host respects the maximum memory configured
    in their php.ini file, or if they are using other methods to limit your access to memory.

    –Starting test–
    Current maximum memory configured in php.ini: 256M
    Current memory usage: 2.00M
    Attempting to set max memory to 256M.
    Starting memory benchmark. Seeing an error after this line is not unusual. Read the error carefully
    to determine how much memory your host allows. We have requested 256 megabytes.
    Tested up to 10.00 megabytes.
    Tested up to 15.00 megabytes.
    Tested up to 20.00 megabytes.


    Tested up to 250.00 megabytes.
    Tested up to 255.00 megabytes.
    Tested up to 256.00 megabytes.
    –Test complete.–

    Your web host allows you to use at least 256.00 megabytes of memory for each PHP process hosting your WordPress site.

    Site 2

    Wordfence Memory benchmarking utility version 7.4.1.
    This utility tests if your WordPress host respects the maximum memory configured
    in their php.ini file, or if they are using other methods to limit your access to memory.

    –Starting test–
    Current maximum memory configured in php.ini: 256M
    Current memory usage: 2.00M
    Attempting to set max memory to 256M.
    Starting memory benchmark. Seeing an error after this line is not unusual. Read the error carefully
    to determine how much memory your host allows. We have requested 256 megabytes.
    Tested up to 2.00 megabytes.
    Tested up to 2.00 megabytes.


    Tested up to 2.00 megabytes.
    Tested up to 2.00 megabytes.
    –Test complete.–

    Your web host allows you to use at least 2.00 megabytes of memory for each PHP process hosting your WordPress site.

    Any idea what the issue with the second site could be? The diagnostics are all green.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I also at times get the following error

    Wordfence Memory benchmarking utility version 7.4.1. This utility tests if your WordPress host respects the maximum memory configured in their php.ini file, or if they are using other methods to limit your access to memory. –Starting test– Current maximum memory configured in php.ini: 256M Current memory usage: 2.00M Attempting to set max memory to 256M. Starting memory benchmark. Seeing an error after this line is not unusual. Read the error carefully to determine how much memory your host allows. We have requested 256 megabytes. Tested up to 2.00 megabytes. Tested up to 2.00 megabytes. (…) Tested up to 2.00 megabytes. Tested up to 2.00 megabytes.
    Fatal error: Out of memory (allocated 2097152) (tried to allocate 254804000 bytes) in /var/www/html/wp-content/plugins/wordfence/lib/wordfenceClass.php on line 5404

    There has been a critical error on your website.

    Plugin Support wfphil

    (@wfphil)

    Hi @saowp

    Are both sites running on the exact same web server running the exact same version of PHP?

    See our fix released in Wordfence version 7.4.2 – which you don’t have installed:

    Fix: Fixed PHP memory test for newer PHP versions whose optimizations prevented it from allocating memory as desired.

    Also for the error there are two types of memory error that we see, with the second one being much rarer (where xxxxx is a numerical value):

    Fatal error: Allowed memory size of xxxxx bytes exhausted (tried to allocate xxxxx bytes)

    Fatal error: Out of memory (allocated xxxxx) (tried to allocate xxxxx bytes)

    The first error above occurs when WordPress, the theme and all plugins on a site consume more memory from the web server than is allowed by the PHP directive memory_limit.

    However, your log specifically mentions “out of memory” which matches the second error above. This is likely to be memory exhaustion occurring outside of PHP somewhere on the server and you will need to ask your hosting provider to see if they can fix this.

    The operating system log files and web server log files will likely show if memory is being exhausted somewhere outside of PHP.

    Thanks, @wfphil . The bug seems to be fixed in version 7.4.2, and the test now gives the complete memory on both servers.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.