Mahara 19.10 upgrade fails due to set_time_limit 30 seconds

Bug #1906908 reported by Marcus Leonard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Triaged
Wishlist
Unassigned

Bug Description

When upgrading to 19.10.x (or higher), the hard-coded set_time_limit(30) in lib/db/upgrade.php is too short for one of the steps if you have a fair bit of data to get through:

[DBG] a4 (lib/db/upgrade.php:1565) Fixing skins for new format options
PHP Fatal error: Maximum execution time of 30 seconds exceeded in /path/to/mahara-19.10.5/htdocs/lib/skin.php on line 965

(We have database size 2.5GB, disk usage 351.4GB.)

The only way I could get this to complete was to either run cli upgrade.php repeatedly, or patch upgrade.php to set_time_limit(300). It took nearly four minutes to complete, but with this setting it completed normally.

This part of the upgrade process should probably be put into some kind of batch counted loop to fit into 30 second chunks.

Changed in mahara:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :
Revision history for this message
Robert Lyon (robertl-9) wrote :

Looking at this I'm thinking the get_rgb_from_hex() function is being a bit slow and because it is called multiple times during the generate thumbnail for skins. So if on slower machines it could take longer than the 30sec timeout

Revision history for this message
Marcus Leonard (marcus-leonard) wrote : Re: [Bug 1906908] Re: Mahara 19.10 upgrade fails due to set_time_limit 30 seconds

This is a dev server we're testing the upgrade on. It's an ESX VM with 2
cpus and 2GB RAM, so not a great deal of grunt.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.