|
Martin,
Unfortunately, I no longer have the sites available to test as the only way around the problem was to backup without the quiz attempts. However, I recall that I did try it at the time with the external executables and although I did relieve the problem slightly it still did not complete the backup. However, I did encounter the problem on a number of courses and sites so I am reasonably confident the problem exists. I'll have a think about how I can generate some test data to demonstrate this (or at least see if it persists on 1.8). Neither mod/quiz/backuplib.php nor question/backuplib seem to be doing anything too evil.
$quiz_attempts = get_records("quiz_attempts","quiz",$quiz,"id"); $question_states = get_records("question_states","attempt",$attempt,"id"); $rqp_state = get_record("question_rqp_states","stateid",$state); so it loads one record about each attempt into memory. Then for each attempt, it loads all the records about that attempt. So, while these would be prime candidates for get_recordSET, I don't think that is what is causing memory to run out. Howard - any idea if this is still an issue with newer versions of Moodle?
Dan Definitely still an issue in 1.8.2 - it can really burn up memory.
What if we close this and try to advance in
Ciao thanks,
Dan I honestly don't know. The main problem has been in our School of Dentistry. They heavily use quizzes but I doubt they use non-english characters.
I'm closing this as duplicate of MDL-15489. Update your watches.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
the most important memory eater in backup and restore is, AFAIK, the zip and unzip libraries/executables. If you are using the internal ones... can you try with the external executables instead?
the numbers you expose above (1000 attempts with 25 questions each) doesn't sound really high. It makes, more or less, 25000 answers to be stored and, using 1K by answer (and that's an exaggerated measure) it's around 25MB only (far from the half a gig).
Can you confirm the zip/unzip thing? If the problem persists we can do further tests to see if something else is happening.
TIA and ciao