Large G1 Import

axman

Joined: 2002-09-07
Posts: 57
Posted: Sat, 2005-03-12 00:33

I just imported a 5100 or so image gallery into Gallery2. On import, i selected the options to generate the thumbnails. Now, when i load gallery2/ to launch the page, the browser just sits there and thinks. What is going on?

Is gallery attempting to do something to all my images?

Thanks.

----

Gallery URL (optional):
Gallery version: Gallery 2 Beta 1
Webserver (with version): Apache 2.0.53
Datatabase (with version): Mysql 4.0.10a
PHP version (eg 4.2.1): PHP 5.0.3 w/Zend Optimizer
phpinfo URL (optional):
Graphics Toolkit(s): ImageMagick
Operating system: Fedore Core 3
Web browser/version:
G1 version (for migration bugs):

 
axman

Joined: 2002-09-07
Posts: 57
Posted: Sat, 2005-03-12 00:55

It finally came up with this error:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/webroot/main_site/docs/gallery2/modules/core/classes/GalleryStatus.class on line 482

Fatal error: Maximum execution time of 30 seconds exceeded in Unknown on line 0

Fatal error: Maximum execution time of 30 seconds exceeded in Unknown on line 0

 
johann@nenni.net
johann@nenni.net's picture

Joined: 2003-09-01
Posts: 43
Posted: Sat, 2005-03-12 07:53

I am only converting 3300 Photos, But I did in alpha4 change the limits in my PHP.ini to this values:

;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;

max_execution_time = 300 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
memory_limit = 80M ; Maximum amount of memory a script may consume (8MB)

In fact I did change the first line, max_execution_time to much more while I was converting, and I also had to change the memory_limit.

(I am running on SuSE 9.2, Apache 2.0.50, php 4.3.8, With Zend installed)

Nb. Im only running 2Xcpu 450Mhz Pentium II, with 512Mb memory, but using Raid0 on 6 disks (10K rpm) SCSI disk.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-03-12 07:53

Hmm. Unfortunately PHP doesn't tell us *what* it was doing when it ran out of time. My guess is that it's doing a lot of stuff in the database on the first load. Even so, 30 seconds is a loooong time. You neglected to fill out any of the useful info (re-edit your first post and add it please) so it's hard to tell what might be going on. What kind of hardware are you running on?

 
axman

Joined: 2002-09-07
Posts: 57
Posted: Sat, 2005-03-12 08:24

I am running on a Athlon 64bit 3200 system with 1gb of ram. So i dont think its a problem due to lack of hardware capabilities.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-03-12 22:04

Hrm. That's odd. Try editing your config.php and putting G2 into logged debug mode, and give it a logfile to write to. Then reload the page. This will generate a *huge* log file. Zip up the first few megs of it and gives us a url to it and we'll check it out and see if we can figure out what's going on.

 
axman

Joined: 2002-09-07
Posts: 57
Posted: Sat, 2005-03-12 22:17

Here is a snippet of the first hunk of the file:

http://dev.frozenpc.net/gallery

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sat, 2005-03-12 22:43

Ah ha! That's a very useful snippet. It looks like GalleryTemplate::_initCompiledTemplateDir() is going into an infinite loop. The good news is that this is probably relatively easy to fix, once I figure out the problem. I'd like to investigate this more closely to figure out what's going wrong. Would it be possible for me to ssh to your box and examine it? That'll be the fastest way for me to sort it out. Thanks!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Sun, 2005-03-13 23:14

I've figured this out (and fixed your G2, Axman -- thanks for the ssh access!).

Turns out that the problem was that the permissions on the g2data directory were set such that G2 could not write files there. This was easy to fix. But the reason why this was causing an endless loop was that Axman had enabled the debug module and it was trying to use the debug status formatter to dump out the error message, and that tries to use a template, which triggers another error, which tries to use templates, etc ad infinitum.

I hardwired Axman's system to always use the standard HTML error formatter to fix the problem, but this makes me wonder - should we just disable overriding the stack trace formatter? I (as a developer) don't use it. I don't think that users get anything out of it. It would only be used in situations where we've *already* had a problem and since it, itself can cause *new* problems it seems like unnecessary complication.

I've convinced myself. I'll go ahead and remove it -- if anybody thinks this is a bad idea let me know and I'll put it back.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Sun, 2005-03-13 23:18

you mean debug module making links into the source files? i have used it, but not very much.. not a big loss for me.

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2005-03-14 00:57

Ok, good. Cause I just toasted that feature, along with the debug:FileViewer view.

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Mon, 2005-03-14 01:14

so does the debug module do anything anymore?
getting rid of it would remove some confusion with "i activated the debug module but i don't see any debug output"

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Mon, 2005-03-14 02:06

The only thing it has now is the the Debug tree viewer. I'm +1 for just deleting it altogeher. That will make for an interesting upgrade path -- how do we get rid of an entire module if it's activated? I guess that's a separate topic though :-)