G2 Beta 1 Import issue

jpeadro

Joined: 2003-12-24
Posts: 198
Posted: Wed, 2005-03-09 00:27

Running Gallery 1.5 RC1. I installed another instance of G2 B1 and am attempting to import album by albums. I keep getting this error message "Fatal error: Maximum execution time of 30 seconds exceeded in C:\Inetpub\wwwG2\gallery\modules\core\classes\GalleryDataCache.class on line 273"
In my php.ini file i have the excution time cranked up. Any thoughts.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-03-09 00:34

restart the webserver when changing php.ini...

 
jpeadro

Joined: 2003-12-24
Posts: 198
Posted: Wed, 2005-03-09 02:15

These values have not changed in over 1yr in my php.ini

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

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

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-03-09 08:59

what does the yourgalleryurl/lib/tools/phpinfo.php say about your local max execution time? and in the installer step "system check" (you can access the installer safely, just don't go past step create config.php/ core module), are all checks green?

 
jpeadro

Joined: 2003-12-24
Posts: 198
Posted: Wed, 2005-03-09 14:24

In the phpinfo.php:

max_execution_time 3000 3000

And from the installer:

System Checks
PHP Version Success
FILE Directive Success
Safe Mode Success
Session Auto-Start disabled Success
exec() allowed Success
set_time_limit() allowed Success
Memory limit (no limit) Success
File uploads allowed Success
Maximum upload size (200Mb) Success
Maximum POST size (512Mb) Success
Gallery file integrity Success

 
nitrotn
nitrotn's picture

Joined: 2005-02-09
Posts: 391
Posted: Wed, 2005-03-09 16:22

Hi!

Perhaps you have an entry in the .htaccess file?
my 0.02$

 
crux

Joined: 2002-12-06
Posts: 61
Posted: Wed, 2005-03-09 16:43

Hello,
I'm having a similar issue that is most likely related. I recently ran myresize in Gallery1 that ran for hours with no timeouts. I think it's something specific to Gallery2 in this case.

Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Group\Apache2\htdocs\modules\Gallery2\modules\migrate\classes\Gallery1DataParser.class on line 88

I recall a timeout in the setup of Gallery1. Is there something similar in Gallery2?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Wed, 2005-03-09 17:07

crux, go to yourgalleryurl/lib/tools/phpinfo.php
is the local value for execution limit 30 seconds or not?

nitrotn, no, if it was a .htaccess issue, then we would have seen the effect in the phpinfo.php in lib/tools/

jpeadro, strange. maybe someone else knows an answer.

 
crux

Joined: 2002-12-06
Posts: 61
Posted: Wed, 2005-03-09 17:12

Thanks for the response. I feel it's similar because:
max_execution_time 12400 12400

All other settings in my php.ini file are cranked up too. I've run php scripts through gallery1 that lasted very long. No changes other than trying this same stuff in gallery2.

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Wed, 2005-03-09 18:17
crux wrote:
Hello,
I'm having a similar issue that is most likely related. I recently ran myresize in Gallery1 that ran for hours with no timeouts. I think it's something specific to Gallery2 in this case.

Fatal error: Maximum execution time of 30 seconds exceeded in C:\Program Files\Apache Group\Apache2\htdocs\modules\Gallery2\modules\migrate\classes\Gallery1DataParser.class on line 88

I think that gallery2 asks for more time 30 seconds at a time. How large are the albums that you are trying to import? Maybe the migration module needs to ask for more time, or ask for time right before unserializing the g1 data.

The general difference between G1 and G2 is that G1 tends to output information as it goes, whereas G2 holds off until it is done. That makes G2's code cleaner, but has a few side effects.

 
crux

Joined: 2002-12-06
Posts: 61
Posted: Wed, 2005-03-09 18:48

The albums range from 10 pictures to 400 pictures. Multiple galleries. I understand the difference in the way they work now. I am still pulling in multiple galleries with thousands of pictures, but selected about 15 albums vs. all 50 albums and it's working fine. The initial thinking gallery had to do to churn through and begin processing all those albums was probably where the timout happened.

Thanks!

 
crux

Joined: 2002-12-06
Posts: 61
Posted: Wed, 2005-03-09 19:31

Check that, everything was working great until the script got to my 60MB movie file. Got the timeout again. Even if I just try to import the one album with that one file, I get the same issue. Any way to manually move this one file or increase the timeout?

Thanks!

 
mindless
mindless's picture

Joined: 2004-01-04
Posts: 8601
Posted: Wed, 2005-03-09 21:42

yes, you can add the movie directly to G2 instead of via migration..

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2005-03-11 05:00

In the meantime, you can do a quick hack in modules/core/classes/Gallery.class. Find:

    function guaranteeTimeLimit($limit) { 
        if ($limit <= 0) { 
            $limit = 30; 
        } 

Change the $limit value from 30 to something large (3000). Then pray that we don't have an infinite loop in our code somewhere :-)

 
jpeadro

Joined: 2003-12-24
Posts: 198
Posted: Fri, 2005-03-11 21:04

I tried changing that 30 to 3000 and it still hangs. I don't get it. What else can I try that might help resolve this issue?

TX

 
virshu
virshu's picture

Joined: 2003-09-13
Posts: 314
Posted: Sat, 2005-03-12 07:00

bharat, I've been running with $limit=0 for months (otherwise my debugger crashes) with no problem. So, high chance that there are no infinite loops

 
bharat
bharat's picture

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

jpeadro, try getting the next nightly build. Jesse extended some time limits in the migration code that may resolve it for you.

 
jpeadro

Joined: 2003-12-24
Posts: 198
Posted: Sun, 2005-03-13 05:18

How do I get the nightly build in a zip file?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Sun, 2005-03-13 12:56

http://galleryupdates.jpmullan.com

you get there by the Download Now! link from the top left menu on this site.

 
lindehoff

Joined: 2005-04-03
Posts: 20
Posted: Thu, 2005-04-14 09:22

Did anyone get it to work, I have the same problem?

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-04-14 09:49

lindehoff, do you have G2 beta 2 or newer?

 
lindehoff

Joined: 2005-04-03
Posts: 20
Posted: Thu, 2005-04-14 09:54

Yes, the Nightly Build. I'm running on IIS

 
lindehoff

Joined: 2005-04-03
Posts: 20
Posted: Thu, 2005-04-14 09:57

It seems to apear when it get stuck on the same picture för more the 30 sec, It's not the same picture every time it changes. I have raized the maximum time from 30 to alot.

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Thu, 2005-04-14 10:25

that makes sense. but why would it take more than 30 seconds for a single item?
maybe we could allocate more than 30 seconds / item.
jmullan will know more.

 
lindehoff

Joined: 2005-04-03
Posts: 20
Posted: Thu, 2005-04-14 10:28

That would be great, i don't know why is take so long sometimes most of the items just take a milisec.

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Thu, 2005-04-14 17:19

lindehoff, could you fill out the support template? Also, what image/movie/etc. is it failing on?

 
lindehoff

Joined: 2005-04-03
Posts: 20
Posted: Fri, 2005-04-15 18:53

It's not a specific file, sometimes it comes to 60% and other times just 5%. I'm pretty sure that's it accurs when the system dosne't complete a singel file in 30 sec. It there a way to increes that time.

 
jmullan
jmullan's picture

Joined: 2002-07-28
Posts: 974
Posted: Fri, 2005-04-15 19:30

What sort of data is it failing on? Images? Movies? Monkeys? Invertebrates?