• Resolved wundawoman

    (@wundawoman)


    Hi there

    When I activate the plug in I get the following error message and it crashes the site:

    Fatal error: Out of memory (allocated 27262976) (tried to allocate 4403798 bytes) in /homepages/15/d553256708/htdocs/wordpress/wp-content/plugins/wordfence/lib/wordfenceHash.php

    I use Wordfence on all my sites and have never had this issue before. All my sites have the same hosting package and one of my sites uses the same theme as I am using in this instance, and the plug in works. Do you have any ideas what the problem could be?

    https://wordpress.org/plugins/wordfence/

Viewing 12 replies - 1 through 12 (of 12 total)
  • I’m having the same problem when I try to run a wordfence scan on one of my sites. Two of my other sites with the same hosting package run wordfence without any problems.

    Hi

    Usually the memory for php is set too low, or your plugins combined are consuming too much memory. Regardless, it is an easy fix. Follow the instructions here:
    http://docs.wordfence.com/en/PHP_Fatal_error:_Allowed_memory_size%3F_What_does_that_mean%3F

    tim

    Thread Starter wundawoman

    (@wundawoman)

    Thank you for coming back to me, and for the advice. However this is one of only 7 plug ins installed on a very small site. I have Wordfence running in conjunction with many more plug ins than this on bigger sites with the same host, and in one instance using the same theme, and have never had this issue before, so it doesn’t make much sense that now I’m having memory issues?

    I don’t believe there is anything else that causes that php error message. I don’t know what your particulars are, or the differences in your settings, but something is definitely using the memory up. You might verify your settings on our options page, especially scan execution time and memory allowed.

    tim

    Hi there, increasing the memory limit (128M to 512M) solved the same issue that i had.

    Just one question : Does the memory limit applies to the whole PHP5 process or is it allocated for each website ?

    For the story :
    I’ve got 7 wordpress websites hosted onto the same server, with wordfence on it, and i was getting high CPU usage issues since recent updates (maybe wordpress updates, not Wordfence).
    The funny thing is that increasing this memory_limit did actually free some RAM (over 600MB). I guess that the process was in trouble because of this limit.

    Wait, i rebooted the server just to check…

    And the plugin was disabled, with the message : “Plugin could not be activated because it triggered a fatal error.”
    🙁
    I check the php.ini again and the value is still :
    memory_limit = 512M

    Should i increase it again, as i’ve got many websites ?

    Any help would be very appreciated.

    I’ve never seen it set that high. I’d start in the error logs and see if you can see what is using so much memory. That’s way too high.

    tim

    Thanks for responding.

    After apache2 restart,
    /var/log/apache2/error.log says once every 1:05 minutes :

    PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 675075 bytes) in /home/mesnieforum/www/wp-includes/functions.php on line 377, referer: http://www.mesnie.org/wp-admin/plugins.php

    Here is the code of this section :

    /**
     * Serialize data, if needed.
     *
     * @since 2.0.5
     *
     * @param string|array|object $data Data that might be serialized.
     * @return mixed A scalar data
     */
    function maybe_serialize( $data ) {
    	if ( is_array( $data ) || is_object( $data ) )
    		return serialize( $data );
    
    	// Double serialization is required for backward compatibility.
    	// See https://core.trac.wordpress.org/ticket/12930
    	if ( is_serialized( $data, false ) )
    		return serialize( $data );
    
    	return $data;
    }

    Ive just updated my wordfence plugin, everything was working as normal before, every time i go to activate it i am getting the following error. “Plugin could not be activated because it triggered a fatal error.””

    Other plugins have updated fine. In my log files i too have

    PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 675075 bytes) in /home/mesnieforum/www/wp-includes/functions.php on line 377

    :S

    amcgall

    (@amcgall)

    I ripped out every hint of Wordfence on all of my wordpress sites. On one site it was using almost 2048MB of RAM. When that ran out the site died. I had the same issue on another site.

    So my simple solution is REMOVE IT IMMEDIATELY.Until they learn to write more efficient code Wordfence will not darken the door of any of my sites.

    I’ve had the exact same problem as suggys and I have plenty of memory available on my install. I love wordfence but my site is unbearable with the latest version. My problem is now that I can’t re-activate the plugin I’m not sure how I can get rid of all the wordfence entries in the database. I know I could just drop the wordfence tables but there must be some other stuff in the wordpress core tables as well I expect.

    Plugin Author WFMattR

    (@wfmattr)

    lackadaize: You can use the “Wordfence Assistant” plugin to remove Wordfence’s data without having Wordfence activated. It’s definitely not normal for so much memory to be used. Wordfence doesn’t put much in the core database tables — some small items like wp-cron entries (for scheduling) and transients (for short-term tracking of login attempts, etc.) Reinstalling Wordfence after removing the data may help, if something had broken during one of the updates, or if your host’s database had a problem.

    If you want to work on troubleshooting the problem, can you create a new topic, using the form at the bottom of the list of posts? The wordpress.org moderators ask us to make each person’s issue a separate post even if they’re similar — it helps us keep track of open issues too. If you do post, please copy and paste the error message if it runs out of memory, so we can see the number. Thanks!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Getting a fatal error message on activation of plug in’ is closed to new replies.