G1-G2 Migration - memory exhausted

brendanh

Joined: 2005-03-31
Posts: 13
Posted: Thu, 2005-03-31 18:10

I set it to import all albums, no users, unchecked G1-G2 URL mapping...

At the migration progress screen, on the 1st album it gets to, I get this error in small writing:

Fatal error: Allowed memory size of 8388608 bytes exhausted (tried to allocate 46080 bytes) in /var/www/html/gallery2beta/modules/core/classes/GalleryLayout.class on line 440

btw, is there a User CP or somewhere I can change my password on this forum? I think this is the 2nd account I've had here and I'll prolly lose this password as well before too long... ;) tkx!


Gallery URL (optional):
Gallery version: G2 beta Dark Fibre
Webserver (with version): Apache/2.0.50
Database (with version): MySQL 3.23.58
PHP version (eg 4.2.1): PHP v4.3.8
phpinfo URL (optional):
Graphics Toolkit(s): ImageMagick
Operating system: Redhat 9
Web browser/version: Opera 7.54 on Windows
G1 version (for migration bugs): 1.4.4-pl2

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-04-01 08:43
 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Fri, 2005-04-01 18:05

I tried to post this FAQ yesterday, but there was a session problem or something, and I gave up after a few tries. Actually, I thought that it had successfully posted. :/

brendanh, I'd bump it up to 32M or more for the migration. Let us know if you have any further problems. Thanks!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Fri, 2005-04-01 18:18

jmullan, i saw that post.. maybe it was a different topic (or else it mysteriously disappeared)

 
brendanh

Joined: 2005-03-31
Posts: 13
Posted: Sat, 2005-04-02 04:15

32M eh, ok I shall try that. I assumed 16 would be more than enough, because after upping to 16 I was still getting this error.

I also thought it was a bit odd that it said 8388608 bytes exhausted (tried to allocate 46080 bytes) ..

because the amount it said it was allocating was less than what the maximum was. Perhaps I'm merely reading that error message wrong.

 
fryfrog

Joined: 2002-10-30
Posts: 3236
Posted: Sat, 2005-04-02 05:18

It is bumping up against 8mb, so I would guess that somewhere in a .htaccess file you have the memory limit set to 8mb. It could also be that you didn't HUP apache after you changed your php memory limit.

 
brendanh

Joined: 2005-03-31
Posts: 13
Posted: Sun, 2005-04-03 16:47

I've upped it to 32, then 64, got the exact same message...

The .htaccess is located in the gallery root, is that correct?

Nope I haven't HUP'ed my apache, how do I do that?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-04-05 03:17

Just stop and restart it.

 
brendanh

Joined: 2005-03-31
Posts: 13
Posted: Tue, 2005-04-05 15:43

umm, I don't have root :(

 
brendanh

Joined: 2005-03-31
Posts: 13
Posted: Wed, 2005-04-06 15:26

...bump

Is restarting Apache the only way to get the new memory size to take effect?

If that's the case.. one would hope the final release of G2 didn't require people to have root just to be able to import from G1.

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Wed, 2005-04-06 16:36

If your apache obeys your .htaccess, you can set it there, too.

You would put such a file either in
http://www.domain.com/gallery2/
or the parent directory
http://www.domain.com/
If your gallery is at
http://www.domain.com/
then it will have to be in the same directory.

You don't have to be root to restart apache, but you do have to be able to contact the person who IS root to tell them that you need more memory for php, even if only temporarily. Personally, I would run a minimum of 16M for g2 all the time.

Try the .htaccess thing. If that doesn't work, start disabling unnecessary g2 modules. You only need one image toolkit. You might not need ffmpeg. You won't need the imageblock during your migration. Etc.

Honestly, I'm surprised that a non-trivial gallery1 install runs under 8M of RAM.

 
brendanh

Joined: 2005-03-31
Posts: 13
Posted: Thu, 2005-04-21 03:11

I'd say it's non-trivial, 1800 photos or so. And you're right, 8M isn't enough for my G1... the search feature doesn't work because of lack of memory errors.

I've tried the .htaccess thing, doesn't seem to work for me.

I don't need root to restart apache eh. How do I do it from a shell?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Thu, 2005-04-21 06:44

You need root to restart apache, so if the .htaccess trick doesn't do it then talk to your sys admin.

 
HrlyKrs
HrlyKrs's picture

Joined: 2005-01-18
Posts: 19
Posted: Mon, 2005-04-25 21:28

i have 126 albums; 3,846 pictures. i tried importing them all at once, and i tried importing them one at a time, and it still fails. is there a better way to do this?

[client 141.155.26.196] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 1994715301 bytes) in /home/khubert/public_html/gallery2/modules/exif/lib/exifer/exif.inc on line 544, referer: http://www.kh-tech.com/~khubert/gallery2/main.php
Allowed memory size of 536870912 bytes exhausted (tried to allocate 0 bytes)

> grep memory_lim /etc/php.ini
memory_limit = 512M ; Maximum amount of memory a script may consume (8MB)

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Tue, 2005-04-26 03:01

krishubert, please fill out the support template:
----

Gallery URL (optional):
Gallery version:
Webserver (with version):
Datatabase (with version):
PHP version (eg 4.2.1):
phpinfo URL (optional):
Graphics Toolkit(s):
Operating system:
Web browser/version:
G1 version (for migration bugs):

Especially, what version of g2 do you have?

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Tue, 2005-04-26 03:09

It's trying to allocate 1.9GB of memory. This is probably the bug in exifer that I recently fixed. Get the latest nightly snapshot from jmullan's page (see his signature) and see if that resolves it. (and fill out the support template!)

 
HrlyKrs
HrlyKrs's picture

Joined: 2005-01-18
Posts: 19
Posted: Tue, 2005-04-26 18:36

Gallery URL (optional): http://www.kh-tech.com/modules/gallery2
Gallery version: 2.x
Webserver (with version): Apache/2.0.52 (Fedora)
Datatabase (with version): MySQL Ver 11.18 Distrib 3.23.58, for redhat-linux-gnu (i386)
PHP version (eg 4.2.1): PHP/4.3.11
phpinfo URL (optional): http://www.kh-tech.com/modules/gallery/setup/phpinfo.php
Graphics Toolkit(s):
Operating system: FC3
Web browser/version: FireFox
G1 version (for migration bugs):

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Tue, 2005-04-26 19:10

krishubert, please upgrade to a nightly build to see if that fixes your exif problem. Thanks!

 
HrlyKrs
HrlyKrs's picture

Joined: 2005-01-18
Posts: 19
Posted: Tue, 2005-04-26 19:45

still didn't work.

[client 141.155.26.196] PHP Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 1994715301 bytes) in /home/www/html/modules/gallery2/modules/exif/lib/exifer/exif.inc on line 544, referer: http://www.kh-tech.com/modules/gallery2/main.php
Allowed memory size of 536870912 bytes exhausted (tried to allocate 0 bytes)

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Tue, 2005-04-26 19:58

krishubert, if you can identify the image that is tried to import and causes this exif parsing error, please link it here in the forums such that we can debug the issue.