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.

DataObjectManager Module

Discuss the DataObjectManager module, and the related ImageGallery module.

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

ImageGallery problem


Reply

7 Posts   1352 Views

Avatar
animasola

1 February 2010 at 6:08am Community Member, 121 Posts

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

1 February 2010 at 6:33am 4085 Posts

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

Avatar
animasola

1 February 2010 at 7:14am Community Member, 121 Posts

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

1 February 2010 at 11:10am 4085 Posts

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

1 February 2010 at 5:02pm Community Member, 121 Posts

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

1 February 2010 at 5:55pm 4085 Posts

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

1 February 2010 at 7:31pm Community Member, 121 Posts

That did the trick! thanks. :)