Monday, March 26, 2012

Moodle server update

I looked in the error log for my new moodle 2.2 server that I set up last week and saw the error message indicating max_execution_time exceeded 30 seconds. This happened when I was trying to upload a backup file to the server. It reminded me that a similar thing happened a few weeks back when I was working with a customer of 3rd party vendor content. The vendor was Florida Virtual, and we were looking at a economics course from them. In their model, all of the content is pushed to the vendor, us, site - hence the 350 MB upload file.

Update the max_execution_time in php.ini

I had to make a couple changes to our content server, that is moodle 2.0.2, to allow the file to upload. The error basically means no transaction on the server gets to take longer than 30 seconds, which is reasonable, but for moodle, a little too short.

It makes sense to set this to 30 seconds, since you do not want some rouge process tying up your processor for too long, that's a good way to crash the entire server.

I am going to change our default setting to 60 seconds. The setting is in the php.ini file. Once the setting is made, restart Apache to force a re-read of the ini file.

Success restoring course backup file


I changed the setting, restarted Apache, verified the change using php info and then was able to restore a backup file from an older moodle version 2.0.2. Initially, it crashed during the restoration process. Allowing more time for the process to finish was the golden egg.

No comments:

Post a Comment