Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Fatal Error...Memory Allcoation.../SQLQuery.php


Go to End


2 Posts   1182 Views

Avatar
Radii

Community Member, 2 Posts

27 May 2011 at 8:26am

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?

Avatar
martimiz

Forum Moderator, 1391 Posts

28 May 2011 at 10:36pm

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.