• Resolved geofones

    (@geofones)


    Whilst trying to upload a gpx cycle trail using the WP GPX plugin I get the following error:

    Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 35367577 bytes) in /wp-content/plugins/wordfence/vendor/wordfence/wf-waf/src/lib/rules.php on line 1600

    Is there any way of increasing the limit in wordfence please
    Memory: 107.5 of 256 MB (42%) | WP LIMIT: 40 MB | PHP 5.6.37 @64BitOS Version 4.9.8

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • This is a question that comes up every so often from people who have growing websites. This issue is not a Wordfence error but simply indicates that you need to increase your site’s memory available to php. Usually your hosting provider will edit your php.ini file to increase the memory_limit parameter, and they may also have to increase your web server memory limit along with any operating system limits they have. They can define this in the php.ini file (usually found in /etc on linux systems – check your documentation for windows servers, which are currently unsupported by Wordfence).

    Look through the file for a line like this: memory_limit = 128M

    Keep in mind the 128M is probably different. That’s the amount of memory that php is allowed to consume. If you have 10 plugins and combined they consume more memory than you have allocated, you’re going to have problems. You can assign more by increasing this value. (Some of our personal sites have 512M allowed, but these are pretty big sites with a substantial number of hits and plugins).

    Make sure and restart httpd (apache) after making changes if you manage your own server. If you don’t the hosting provider will do this for you..

    Our system requirements specify 128m being needed (though we use less) but we’re seeing many WordPress specific hosting providers allowing 256m by default to give wordpress room to breathe.

    There are a few other things you can try.

    1. In your wp-config.php you can try setting the amount of memory WordPress can use to a higher number. Example:

    define( ‘WP_MEMORY_LIMIT’, ’96M’ );

    define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ );

    2. On the Wordfence Scan > Scan Options and Scheduling in the section “Performance Options” change the setting “How much memory should Wordfence request when scanning” to 256 if it’s not already set at that.

    3. 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.

    Let me know of any of this helped the problem.

    Tim

    My web hosting package has 256MB on my hosting provider.
    I added the following in wp-config.php to have 128 MB instead of 40 MB.
    define(‘WP_MEMORY_LIMIT’, ‘128M’);
    This works without problems.

    Do I have to add the following and what else would that mean?
    define( ‘WP_MAX_MEMORY_LIMIT’, ‘256M’ );

    thank you very much

    Hi @detoris

    “WP_MAX_MEMORY_LIMIT” is related to tasks run in the admin dashboard as some tasks might require more memory than what you have set for “WP_MEMORY_LIMIT”, in your case, I don’t think you need to define “WP_MAX_MEMORY_LIMIT” parameter.

    Thanks.

    Thank you for the explanation.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘rules.php memory limit’ is closed to new replies.