mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #39234
[Bug 1636090] Re: Execution timeout during 16.10 upgrade when fixing broken user data
** Also affects: mahara/16.10
Importance: Undecided
Status: New
** Also affects: mahara/17.04
Importance: Undecided
Status: New
** Changed in: mahara/16.10
Status: New => Confirmed
** Changed in: mahara/17.04
Status: New => In Progress
** Changed in: mahara/16.10
Importance: Undecided => High
** Changed in: mahara/17.04
Importance: Undecided => High
** Changed in: mahara/16.10
Assignee: (unassigned) => Ghada El-Zoghbi (ghada-z)
** Changed in: mahara/17.04
Assignee: (unassigned) => Ghada El-Zoghbi (ghada-z)
** Changed in: mahara/16.10
Milestone: None => 16.10.1
** Changed in: mahara/17.04
Milestone: None => 17.04.0
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1636090
Title:
Execution timeout during 16.10 upgrade when fixing broken user data
Status in Mahara:
In Progress
Status in Mahara 16.10 series:
Confirmed
Status in Mahara 17.04 series:
In Progress
Bug description:
Mahara: 16.10.0
DB: Postgres
OS: Linux
Browser: FF
While upgrading from 16.04 to 16.10, we are getting the following
error:
PHP Fatal error: Maximum execution time of 30 seconds exceeded in /var/www/clients/mahara/htdocs/lib/mahara.php on line 1569
PHP Stack trace:
PHP 1. {main}() /var/www/clients/mahara/htdocs/admin/cli/upgrade.php:0
PHP 2. upgrade_mahara() /var/www/clients/mahara/htdocs/admin/cli/upgrade.php:53
PHP 3. upgrade_core() /var/www/clients/mahara/htdocs/lib/mahara.php:265
PHP 4. xmldb_core_upgrade() /var/www/clients/mahara/htdocs/lib/upgrade.php:347
PHP 5. set_profile_field() /var/www/clients/mahara/htdocs/lib/db/upgrade.php:4733
PHP 6. safe_require() /var/www/clients/mahara/htdocs/lib/user.php:536
We have over 45K users in the DB and it's timing out.
I've fixed it by adding the following immediately after 'if ($oldversion < 2016090206) {':
$cur_max_execution_time = @ini_get('max_execution_time');
ini_set('max_execution_time', 0);
And, at the end of the if statement (to set the time back to the original timeout):
ini_set('max_execution_time', $cur_max_execution_time);
I didn't use raise_time_limit(0) as it didn't seem to make a
difference. It still timeout after 30 seconds.
Thanks,
Ghada
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1636090/+subscriptions
References