Quizport? and problem backing up large courses

Quizport? and problem backing up large courses

by Gerald Grow -
Number of replies: 4

I am wondering if a backup problem might be related to QuizPort. Let me explain.

On a site with multiple copies of my Newsroom 101 course in Moodle 1.9+, run by multiple teachers, the courses with the most students (around 50) and most completed activities (thus with the largest backups) are starting to fail during the normal Moodle backup procedure.

The two problem courses will go through all the backup steps, start to zip, then hang. If I set system paths to the server's /usr/bin/gzip, they go one more step, but stop with "An error occurred while copying the zip file to the course directory." In the temp directory, the temp backup file looks to be incomplete.

I'm referring to the backup that is set from the Moodle Site Admin block and can be scheduled to take place daily. (I am able to back up the whole site through the server and also by downloading the database and moodledata, but this is less useful in restoring one course.)

I've tried various remedies found on forums (such as modifying php.ini to increase memory_limit), but nothing has helped the largest two courses. I fear that other courses will stop backing up as students complete more work in them and their backups grow larger.

Gordon, is it possible that some limit inside the QuizPort Backup script could be contributing to this backup problem?

Or have you seen a way to solve this problem?

Thanks.

Average of ratings: -
In reply to Gerald Grow

Re: Quizport? and problem backing up large courses

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Gerald,
probably the backup is failing because your server does not have enough execution time, internal memory, or disk space to complete the zipping process. 

You can find out for sure, if you can get to the PHP error message emitted just before the process fails.

If the backup process fails when you backup this course via your browser, or if you force the cron to run from your browser by visiting "http://mysite.com/moodle/admin/cron.php", then you can arrange for the Moodle Debugging settings to display message to your browser, and see the error message that way.

Otherwise, you need to set the PHP error reporting settings, probably in your server's "php.ini" file, so that errors are sent to an error file, and then wait for the next the backup fails and look in the error file to see the error message. Many servers are set up to put PHP error messages into the Apache error log, so that may be the first place you want to look.

regards
Gordon

In reply to Gordon Bateson

Re: Quizport? and problem backing up large courses

by Glenys Hanson -

Hi Gerald,

Just to confirm what Gordon has said. I've had this problem too and it was nothing directly to do with QuizPort - just a question of having a very large and active site. It was fine working on a huge university server (when the technicians had worked out what to do with the php.ini file), but much more difficult on a shared server. Very active courses with a lot of student activity on interactive exercises just are heavy on the server. In fact, QuizPort is much less heavy on the server than the HotPot module because student clicks are cached. (I'm sure Gordon can explain that better.)

Hope you find a solution,

Glenys

In reply to Gordon Bateson

Re: Quizport? and problem backing up large courses

by Gerald Grow -

Thanks for the reply. I'm glad to eliminate Quizport as a possible cause.

With error reporting turned on, I do not know how to interpret the results. The PHP error messages pretty much just repeat this over and over:

Incorrect string "needed" in $status->info, please fix the code (table:user; old_id:394).

  • line 559 of backup/lib.php: call to debugging()
  • line 1787 of backup/backuplib.php: call to backup_getid()
  • line 1694 of backup/backuplib.php: call to backup_gradebook_grades_info()
  • line 1559 of backup/backuplib.php: call to backup_gradebook_item_info()
  • line 3239 of backup/backuplib.php: call to backup_gradebook_info()
  • line 60 of backup/backup_execute.html: call to backup_execute()
  • line 135 of backup/backup.php: call to include_once()

Then the backup hangs at the point of zipping the backup file.

I am running Moodle 1.9.19+. The problem happens on the courses with the largest enrollment and activity. For better or worse, I am my own system administrator, so there's nobody else I can blame this on.

In reply to Gerald Grow

Re: Quizport? and problem backing up large courses

by Gordon Bateson -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

Hi Gerald,
thanks for trying that. The messages that you quoted are actually just "warnings" and they are not causing the final abort.

That fact that this issue only occurs on your largest course is a further indication that the main cause of this problem is either (a) insufficient execution time for the PHP scripts, or (b) there is insufficient memory for zipping process.

You can increase execution time with a setting in the PHP settings file, "php.ini".

Running the backup from the CLI (command line interface) may get also arround the  limitation on execution time.

As for increasing the memory limit, you can probably only do that by paying more money to your hosting company sad

best regards
Gordon