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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

ImageGallery problem


Go to End


7 Posts   1846 Views

Avatar
animasola

Community Member, 121 Posts

1 February 2010 at 6:08am

I encountered a problem with this module (http://silverstripe.org/imagegallery-module/)

It says this:

Fatal error: Allowed memory size of 67108864 bytes exhausted (tried to allocate 12288 bytes) in /home/ahonfoun/public_html/sapphire/filesystem/GD.php on line 22

Is it because I had too many albums? What is the maximum number of albums allowed?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

1 February 2010 at 6:33am

I always run my SS sites at at least 128M.

Avatar
animasola

Community Member, 121 Posts

1 February 2010 at 7:14am

I used to run it at 128M and now I run it at 256M and it still gets errors. Any way I can fix this? And one question, is the memory_limit embeded in the silverstipre configuration somewhere? Like the amount of resources allocated? Do I just need to change the memory_limit in the php.ini or should I fix a file in Silverstripe as well whenever I increase the memory allocation?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

1 February 2010 at 11:10am

Memory limit errors almost always trace back to the GD library. If you have a lot of huge images on your page that have not yet been resampled to the size you're requesting, you'll see memory leakage all over the place.

Avatar
animasola

Community Member, 121 Posts

1 February 2010 at 5:02pm

What is weird is that it says:

Fatal error: Allowed memory size of 67108864 bytes exhausted

Which is around 64 MB. I am very certain that I have edited my memory limit to accommodate 256MB for the memory. But I also remember, when installing SS that it was initially set to 64MB. Is this because it has configured the system to follow the memory limit set at installation? Is it somewhere in a config file where memory limit is set in SS itself?

The only solution I can find is to reinstall the site with an initial limit set to 256MB.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

1 February 2010 at 5:55pm

Just add to your _config.php:

ini_set('memory_limit','128M');

If you're on shared hosting or something, there's probably a restriction on that setting. A lot of hosting providers won't let you have free reign over their resources.

Avatar
animasola

Community Member, 121 Posts

1 February 2010 at 7:31pm

That did the trick! thanks. :)