Quote:
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 41 bytes) in /home/virtual/site1/fst/var/www/html/modules/gallery/classes/Album.php on line 370
Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 177 bytes) in Unknown on line 0
This is the error I get soon after installing V1.3 and running the gallery for a couple of minutes. I am not sure what the problem is. Could it be that I am using albums from a previous version? After I get this message the Gallery just stops responding and times out on me. Please help.
Posts: 487
You are exhausting the available memory that php has access to.
In php.ini there is a config variable name 'memory_limit' that, by
default is set to 8M. I quickly exhausted this after uploading a couple
thousand images and had to increase it. Increase it as you need to
and restart your httpd if php is a module and you should be fine.
Oh, and if you cannot modify php.ini because your on an ISP hosted
and they don't wish to increase it, you can try setting this variable in
the gallery/.htaccess file.
php_flag memory_limit <some high number>
Note that you have to specify in bytes if you use .htaccess, as it won't
parse 8M, but will parse 8000000.
Posts: 3
Any other ideas? I'm having a similar problem. But, I only have 600 photos so far. I do have 52 nested albums.... Anyway, my memory allocation is only 4194304, though I fail to see how gallery can use up that much memory just getting the list of albums for the "Move Photo" or "Move Album" pages. That's where it crashes for me everytime.
The .htaccess fix doesn't work, and my hosting people won't help.
Help please,
-Dan
http://www.FoamFly.com/gallery
Posts: 2
Is there any other way to control memory usage? Gallery has been allocating 40mb instances of apache on my server. I have 2 gig of ram and it's being used up in large part due to gallery.
I don't want to limit php overall as I am running other php scripts.
Any ideas?
Posts: 487
Gallery in it's current state consumes a massive amount of memory due
to all the data it holds in memory at all times. This is being worked on
for G2 and for the next G1 release, but right now, there is nothing you
can do about it except to keep increasing the php memory limit for the
time being.
If you can't override the default behaviour in your .htaccess there isn't much
you can do except try switching to the cgi version of php which gives you more
control over your php environment.
Posts: 101
yeh ive got a fodder gallery with 5000 images ... it very quickly ate 128mb of RAM with 2 ppl viewing it .... have put 256mb ram into the machine and put a 500mb swap onto another hard disk so at least it keeps the main drive not so busy swapping page memory ...
Posts: 756
A possible solution might be the patch Jesse introduced, which splits the albums databases into seperate album and photo databases.
I haven't checked out the memory consumptions yet, but I believe there is a significant drop.
Posts: 2
Thanks Markus - where can I find this patch? I'm new to the site. Is there a place where all the patches are kept?
Posts: 3
Yes, I would like this too. It sounds like a good solution while we're waiting for the next version to be release. Please, where can we find it?
-Dan
http://www.FoamFly.com/gallery
Posts: 756
I understand that the patch (along with others, i.e. ImageMagick as option to NetPBM) is just on the way to be integrated into the CVS tree, step by step. So, one of the next releases might have this patch integrated and might help for the above mentioned issues.
Posts: 974
I am looking for beta testers for the patch. As a beta tester, you would be required to do a few things:
1) Back up all data
2) Update to latest cvs source
3) Apply patch
4) Manually change the album version to a different number in Version.php (line 43):
# $gallery->album_version = 4;
$gallery->album_version = 4000;
5) Run upgrade across all albums
6) Test it!
Please contact me via email:
Posts: 15
another minor nuisance is that somehow the album count is incremented before the album is actually created, so that when you get the memory error, gallery counts an album that really is not there.
I'll try and test your patch, Jesse.
Regards,
Trader.
Posts: 4
This may have fixed our problem!!! Still testing! :grin:
Posts: 794
Try changing "file_uploads = ON" in php.ini
Worked for me.
Posts: 4
The first problem I've found is that I cannot do any image manipulation. This includes creating thumbnails and uploading.
All this was working before, nothing has touched netpbm.
The configuration wizard reports "Success All 12 NetPBM binaries located"
There are no messages I can find in my error log.
The debug message is: "You have no graphics package configured for use!"
I do not understand, please help! :???:
Posts: 7994
Bigtoe, you're running the bleeding edge CVS version. You need to re-run
the config wizard and choose to use the NetPBM graphics toolkit on page
2.