Memory problems???

ashwen

Joined: 2002-08-21
Posts: 1
Posted: Wed, 2002-08-21 06:17
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.

 
vallimar

Joined: 2002-08-15
Posts: 487
Posted: Wed, 2002-08-21 07:53

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.

 
Hippo

Joined: 2002-09-10
Posts: 3
Posted: Thu, 2002-09-12 00:55

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

 
Troy

Joined: 2002-09-13
Posts: 2
Posted: Fri, 2002-09-13 00:46

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?

 
vallimar

Joined: 2002-08-15
Posts: 487
Posted: Fri, 2002-09-13 03:25

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.

 
bpd@darb.net

Joined: 2002-08-20
Posts: 101
Posted: Fri, 2002-09-13 04:16

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 ...

 
ill
ill's picture

Joined: 2002-08-15
Posts: 756
Posted: Fri, 2002-09-13 06:34

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.

 
Troy

Joined: 2002-09-13
Posts: 2
Posted: Sat, 2002-09-14 21:32

Thanks Markus - where can I find this patch? I'm new to the site. Is there a place where all the patches are kept?

 
Hippo

Joined: 2002-09-10
Posts: 3
Posted: Sun, 2002-09-15 17:17

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

 
ill
ill's picture

Joined: 2002-08-15
Posts: 756
Posted: Sun, 2002-09-15 21:35

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.

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Sun, 2002-09-15 23:22

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:

 
trader

Joined: 2002-09-15
Posts: 15
Posted: Tue, 2002-09-17 08:27

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.

 
Bigtoe

Joined: 2002-09-05
Posts: 4
Posted: Tue, 2002-09-17 21:07
Quote:
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?

This may have fixed our problem!!! Still testing! :grin:

 
Warren
Warren's picture

Joined: 2002-07-24
Posts: 794
Posted: Wed, 2002-09-18 04:06
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.

Try changing "file_uploads = ON" in php.ini
Worked for me.

 
Bigtoe

Joined: 2002-09-05
Posts: 4
Posted: Wed, 2002-09-18 12:03

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! :???:

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2002-09-19 04:36

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.