Forums | Mahara Community

Support /
upgrade mahara from 1.7.2 to 1.9.0 problem


Kristina Hoeppner's profile picture
Posts: 4735

07 December 2020, 11:53

Hi Marcus,

Thank you for having created a report. I'm just linking it here for cross-reference.

Thanks

Kristina

Robert Lyon's profile picture
Posts: 759

08 December 2020, 13:40

One thing to notice also is this, from the PHP documentation.

"When called, set_time_limit() restarts the timeout counter from zero. In other words, if the timeout is the default 30 seconds, and 25 seconds into script execution a call such as set_time_limit(20) is made, the script will run for a total of 45 seconds before timing out. "

And because these set_time_limit(30) in the upgrade.php file are inside for / foreach loops it means the loop continues to push the timeout limit to 30 seconds into the future on each loop through.

So if the upgrade is timing out it will be due to a particular slow iteration of the loop rather than there being many items to loop through. But saying that the upgrade will mean more and more things go into memory and so that can make each iteration slower.

Also the upgrade script is designed to be able to started again and in most cases it will continue from last fail. For example, if it's making a new table it should check for it so it's not tried to be made twice. - But that is not always the case - it depends on the complication of the change. 

Cheers

Robert

12 results