Does Anybody Know How to Break that 3000 Second Barrier?

Does Anybody Know How to Break that 3000 Second Barrier?

Erlyn Baack -
Кількість відповідей: 16

This problem has me stumped!  I have two old classes that I can restore in a backup website with no problem, but I cannot back them up on my computer because I always get the "Fatal Error:  3000 second limit exceeded."  I had the classes in my computer under EasyPHP 1.7 (before Christmas and before a reboot), and if I recall correctly, there was a file that contained "3000" seconds which I changed to "6000" seconds, and after that, the complete restores took an hour and ten or fifteen minutes, no problem. підморгую

Now, however, with both EasyPHP 1.8 and Xampp, I cannot find any file with "3000" seconds in it to change which means the number has to be GENERATED somewhere I would think, but where?  What file and what variables? 

To try to get past this problem, I reinstalled my old EasyPHP 1.7 to try to restore the classes but couldn't recreate the problem and solution.  Also, I tried restoring the classes part by part in Xampp and got all the way to the forum essays but timed out on the last step.

And by the way, in an internet search, this 3000 second timeout problem is an old one in other scripts besides Moodle with no clear solutions anywhere!

What I would really like to do is change the 3000 seconds to 6000 seconds.  Thanks, in advance, for any suggestions! 

У відповідь на Erlyn Baack

Re: Does Anybody Know How to Break that 3000 Second Barrier?

Tony Hursh -
I'm not sure where the 3000 is coming from, but you should be able to fix this by changing the max_execution_time variable in the php.ini file.




У відповідь на Tony Hursh

Re: Does Anybody Know How to Break that 3000 Second Barrier?

Erlyn Baack -

Hi Tony,

Thanks for your response!  I'm getting a "little bit" familiar with those php.ini files підморгую , and I'll refer to the ones in EasyPHP-1.8 because I'm a little more familiar with EasyPHP than with Xampp.

There are three php.ini files in EasyPHP (main ones), as follows:
EasyPHP/apache/php.ini
EasyPHP/conf-files/php.ini
EasyPHP/php/php.ini

The notice at the top of the php.ini in apache says it's a GENERATED file that should not be edited.

The php.ini in both the conf-files and php directories have identical lines to edit on lines 243 and 226 respectively as follows:

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

max_execution_time = 30     ; 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 = 16M      ; Maximum amount of memory a script may consume (8MB)

I already changed the memory_limit in both of those files to 16MB to get past the "warning" message of the Moodle installation (1.5.3+), but I'm not sure (1) if these are the numbers that need editing or (2) what numbers to put there.  I was wondering whether 0 defaults to unlimited or whether I should put high numbers there, and if so, how high?  I tried 60 in both max_execution_time and max_input_time, but I still got the 3000 second Fatal Error, time exceeded.

My computer is a Pentium 4, 2.67 GHz, 1GB Ram, and I don't try to do anything else when the class is restoring, so how high can I go on those settings?

Thanks again!

Erlyn

У відповідь на Erlyn Baack

Re: Does Anybody Know How to Break that 3000 Second Barrier?

Tony Hursh -
tried 60 in both max_execution_time and max_input_time, but I still got the 3000 second Fatal Error, time exceeded.

You'd need to change it to 6000 if you wanted 6000 seconds.

After looking through the code, I found:

@ini_set("max_execution_time","3000");

in backup/backup.php

That setting will override the php.ini settings. Try changing that to a larger number.

These must be some monster courses, if it's taking that long!
У відповідь на Tony Hursh

Re: Does Anybody Know How to Break that 3000 Second Barrier?

Erlyn Baack -

Hi Tony,

First of all, thanks a lot for pointing me to the backup/backup.php file.  I'm pretty sure this is the one I've been looking for all along.  I changed the 3000 to 6000, but I STILL time out at 3000 seconds which means there are some old files in the registry.  I'm working on it, and I'll definitely let you know when the classes finally restore.

BTW, these courses are not "monster courses" at all, just 1.5 and 1.8 MB zipped.  They're just two one-semester writing courses, the "weight" of the courses in the forums, mostly, about a dozen in each class, where each student wrote six to eight thousand words.  Fortunately, I've saved the forum discussions in context in a backup online host!

Thanks again! підморгую 

У відповідь на Erlyn Baack

3000 Second Barrier Solved Finally and at Last

Erlyn Baack -
If anyone else is running into the 3000 second barrier when restoring a course locally with Xampp or EasyPHP 1.8, this is what worked for me.  First, though, the two courses I restored are English Composition courses, and I just wanted to save the courses complete with all the students' essays and assignments in context, about 8000 words from each student in the forums averaging six or eight or more layers deep, the courses 1.4 and 1.6MB, NOT big courses at all. підморгую

There are two places to change the 3000 seconds to a higher number, both files in the moodle\backup\ directory.  The files are backup.php and restore.php.  Look for the 3000 seconds values.  I changed the 3000 seconds values to 9999 seconds which was more than I needed, of course, but it was such a relief not to time out.

I hope this helps!
У відповідь на Erlyn Baack

2:23 am and struggling - help! :)

Just H -
Hi all

I have to do a show and tell later today (only found out a matter of hours ago!) and no one can confirm if internet access will be available.

Have installed the windows package and Moodle installed fine.

Exported my live database (only 725Kb gzipped) and have been struggling to get the data into the new database on my laptop; keep getting:

Fatal error: Maximum execution time of 300 seconds exceeded in E:\cfals.com\moodle\admin\mysql\libraries\read_dump.lib.php on line 91

Line 91 is:

$sql = ltrim(substr($sql, min($i + 1, $sql_len)));

Which is basically a foreign language to me сумую

I have tried the changes as mentioned in the posts above but no go.

Any pointers would be much appreciated.

Yours wearily
H
У відповідь на Just H

Re: 2:23 am and struggling - help! :)

Art Lader -
Oh, Harry! I wish I could help! сумую

-- Art
У відповідь на Art Lader

Re: 2:23 am and struggling - help! :)

Just H -
G'day Art . . . told you sleep is over rated big grin

Best thing is the show and tell is to an EMA Training Workgroup Forum (national emergency management organisation over here) so a good opportunity to get people looking at Moodle . . . my Moodle install is unofficial so the show and tell will no doubt lead to politics kicking in within my own organisation (oh joy!).

Sorry to read the decision made over your side of the water. Keep plugging away at them (although latest posts seem to suggest it's not even an LMS/CMS?).

Later
H


У відповідь на Just H

Re: 2:23 am and struggling - help! :)

Just H -
Thanks for the advice gents

Crashed (me . . . not the computer усміхаюсь ) for about 3 hours after I somehow managed to get the data in there . . . trial and error is a wonderful thing!

Only problem (fingers crossed anyway) is I forgot to do a search and replace for URLs so all the links are dead. WIll try that as soon as I get to work and all things going well, I'll have plenty time to prepare for the actual show and tell part of things, if not . . . nothing like a bit of pressure to get the gift of the gab going!

H

EDIT: Spoke too soon by the looks of things . . . there's a lot to be said for having IT department on your side at times look this!
У відповідь на Just H

Re: 2:23 am and struggling - help! :)

Steve Hyndman -
Harry,

Since your zipped download is so small, you may want to try just downloading the the database as an sql without compressing it. If it is under 2meg, then you should be able to upload it through phpmyadmin with no problem. If it is over 2meg, then you could use BigDump http://www.ozerov.de/bigdump.php to stagger the upload...I use this program all the time to upload databases well over 100 meg...works like a charm. Good luck.

Steve
У відповідь на Steve Hyndman

Re: 2:23 am and struggling - help! :)

Art Lader -
Big Dump? Really?!

That's quite a name.

-- Art
У відповідь на Just H

Re: 2:23 am and struggling - help! :)

Dan Stowell -
Line 91 is irrelevant! When PHP scripts go through loops that cause them to exceed the maximum time limit, the time limit will often cause it to halt at a completely arbitrary point. You'll probably find that if you try again, it will halt at a different line.

The easiest solution is probably to push up your execution time limit for the server on your laptop. Edit the php.ini file if you can find it. There should be a config setting (do a search for "300" in the text file) which you can change, then reboot the server and try again.