Jump to:

22979 Posts in 11815 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » Fatal Error...Memory Allcoation.../SQLQuery.php

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 621 Views
  • Radii
    Avatar
    Community Member
    2 Posts

    Fatal Error...Memory Allcoation.../SQLQuery.php Link to this post

    As I was editing the site tree in the backend, it locked up...had to close the browser...

    Every time I login I get this message:
    Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 2843 bytes) in /home/content/j/r/h/jrhoton/html/excelsite/sapphire/core/model/SQLQuery.php on line 382

    My PHP memory is set to 128M and I have tried to reload the system files.

    When I allocate 128M in _config.php the login page displays:
    There was a problem processing your request. ...and it will not show the form to login.

    I just upgraded to 2.4.5 and everything was working fine for about a week. Is there a way to save the content HTML out, and then reload the whole system?

  • martimiz
    Avatar
    Forum Moderator
    1037 Posts

    Re: Fatal Error...Memory Allcoation.../SQLQuery.php Link to this post

    Normally 128M should suffice... These are just some ideas off the top of my head - maybe others have far better ideas, but...

    This could be a situation where php goes through some (endless?) loop, where memory grows and grows until the limit is reached. This doesn't have to be connected to any new code you did. It might be that the number of objects/pages you added caused the issue. It might even be a new php version where code that used to run fine now has issues.

    First I would make sure to create a database backup - that would at least secure your content.

    If you have access to server logs check if there are more errormessages showing

    If you can, download the site to a testserver, and see if the problem reproduces.

    You could try and empty the silverstripe-cache (if you have that), as there might be something crippled there.

    As far as I know, if you point the installation to a new (empty) database in mysite/_config.php, SilverStripe will create new tables for it, thus giving you an empty site. Try loging in then (Security::setDefaultAdmin('name','password') in your mysite/_config.php). This will tell you if the issue is code-only or maybe contentbased.

    621 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.