Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 2 bytes)...

Hello everyone, I am appealing to the community because I have a big problem despite all my research I have no results. My problem is that I do not manage to activate or deactivate my plugins. I try to increase my memory, I read the blog of Evan Winslows which dealt with the subject, but for me it was not detailed enough in his explanation. So I turn to you in the hope that someone who has overcome the problem could help me.

Thanks!

  • create a directory called 'disabled' in your mod directory - this will disable all plugins

    Then you can deactivate any third party plugins that may be at fault.  With that much memory you're either facing an infinite loop or selecting too many entities from the database.

  • What version of Elgg are you using?

    After following the advice of Matt you might also want to install the Database Validator plugin by Cash (http://community.elgg.org/plugins/438616/1.4/database-validator), especially in case you are using some Elgg 1.7 version. There was (is) and issue in Elgg 1.7 that could result (seldomly) in some memory consuming problem with plugin handling. The Database Validator plugin (version 1.3.1 for Elgg 1.7) includes a repair script for this issue. If you are already on Elgg 1.8 this problem should not occur but the Database Validator plugin might be useful in the long run nonetheless to validate the database once in a while. On Elgg 1.8 the likely reason for the memory problem is a buggy 3rd party plugin.

  • I had a similar error on a Elgg 1.8.14 install.  See http://community.elgg.org/discussion/view/1234354/fatal-error-allowed-memory-size-of-268435456-bytes-exhausted In my case this server has a history of wierd errors and I was seeing php OOM issues as well (these occurred well after I posted those messages which follow at the next link) which should not be happening and odd recurring 'random' Elgg errors: http://community.elgg.org/discussion/view/1206156/odd-recurring-error-on-an-existing-install

    In my case simply restarting apache "fixed" this error and it has not recurred for two weeks.  I also changed some settings in /etc/sysconfig or such dealing with how the system handles memory allocation.  I'm not 100% sure this is related or that it "fixed" the problem but if you want I will go back and see what I changed (I can't recall it from memory and need to ssh into the server).  In my case it's very possible that another script on the server was contributing to the problem.

  • re-read 'blog of Evan Winslows..' try hard(er) to overcome your '..not detailed enough in his explanation' ~ we (&others) have used the blog's method before to successfully fix memory errors; so it must have been detailed enough before, then.

  • @Dhrup: this blog of Evan is not available anymore since about two years...

    The solution described in the blog (copy available here: http://community.elgg.org/discussion/view/756584) is only for Elgg 1.7 anyway and Cash has included the fix in his database validator plugin (version 1.3.1), too.

    For any version of Elgg 1.8 the cause for the memory issue is most likely something else - 3rd party plugin. But Larry hasn't mentioned the version of Elgg he's using...

  • iionly: lolz and..? r u trying to help me ? larry's w/ the memory issues ;oO;X;P
    i usually fix my memory issues faster than you can say ' gesundheit ' @any language;
    ( if larry has just ' read the blog of Evan Winslows which dealt with the subject "
    cannot say ' not available anymore since about two years.. ' !;-)

  • Thank you for taking the time to answer me. The version I use is 1.7.15

  • @Dhrup: well, I really missed that Larry mentioned having read Evan's blog. I only knew this blog is no longer available at the original location. But I guess it's still to be found elsewhere.

    @Larry: have you tried creating a file that you name "disabled" in your mod folder as suggested by Matt? This won't solve the underlying problem but will set all plugins inactive on your site temporarily.  This should give you access to the plugin section on your site again where you can disable the plugins for real.

    The issue mentioned in Evan's blog might be the reason for the memory issue on your site but maybe there's something else causing the trouble. Does the error also occur when you disabled all plugins (at least all 3rd party plugins)? If you are able to install the database validator plugin (version 1.3.1 for Elgg 1.7) you can try to use the repair function (which will do what is described in Evan's blog without the need to manually work in the database).

    What you can also do - though you might know already if you tried the solution described in Evan's blog): open your database with phpmyadmin (or a similar tool). Does it tell you any table in your database is damaged? This might also cause the problem. In case there is a damage phpmyadmin can be used to repair the database table.

  • Thank you for your help. But unfortunately the problem is still there because nothing happened. I have been disabled in my Mod. Unfortunately I manage not to withdraw IZAP VIDEO application is responsible. It causes slow my site, the fact of wanting to withdraw prevents me from having inscriptions.I lost one of you will have one last solution.

    Thank you.

  • When exactly do you get the Fatal Error? Is it when you try to enable/disable plugins or is it when a video is processed with izap_videos?

    For removing the izap_videos plugin you could simply remove the izap_videos folder (and possibly the izap_elgg_bridge plugin folder too) from you mod directory. Then call the url http://<your.site.url>/upgrade.php in your browser to flush your site cache. This should remove the izap_videos plugin though I'm not sure if this really works when the cause of the Fatal error is due to the issue described in Evan's blog. Elgg could still hang up itself while processing the states of the installed plugins.

    What happens if you "Disable all" / "Enable all" plugins on the tools page? It might not work to disable/enable a single plugin but it might work to change the state of all plugins at the same time. If the memory issue is still caused by the issue described in Evan's blog, you should be able to add the Database Validator plugin this way to fix it. If this does not work either and removing the izap_videos plugin failed, too, the only way to restore the option to enable/disable plugins is by following the instructions in Evan's blog.