Moodle will use up any and all course memory that you can throw at it when adding an H5P activity

Moodle will use up any and all course memory that you can throw at it when adding an H5P activity

by Harry Kalantzis -
Number of replies: 7

Hi there,

We have encountered an issue when adding an H5P activity (using the H5P plugin).

We are using Moodle 3.8.5 (Build: 20200914) and H5P plugin 1.21.0 (2020080400)

We have a large course with a lot of H5P activities and now when adding an H5P activity, we get an error (see moodle-error.png attached)

I recorded my Moodle screen after I clicked 'Save and display' and before the error appears. In the console I noticed this error shown in the console-error.png attached .

We thought it was an issue with the size of the course and the allocated memory.

But in our test platform we deleted half the course and our IT Department said that "we doubled the limit of memory allowed for a PHP script (to 1Gb) and it still failed. This suggests that Moodle becomes stuck in a loop while adding an activity to this course and it will use up any and all memory that you can throw at it".

Adding a core Moodle activity seems to work fine. The issue appears only with the H5P activity.

Has anyone encountered this before?

Any advice would be very much appreciated!

Many thanks

Harry

Attachment console-error.png
Attachment moodle-error.png
Average of ratings: -
In reply to Harry Kalantzis

Re: Moodle will use up any and all course memory that you can throw at it when adding an H5P activity

by Melanie Scott -
Picture of Particularly helpful Moodlers
I have similar issues if I use big interactive videos, except not on saving...on usage. Decided we just can't do that...which is too bad, because if I want (not me personally...but you get the idea) someone to watch a really long, somewhat boring video of a webinar, having them answer a question every 10 minutes (which participants in the webinar had to do) or so breaks things up...
Average of ratings: Useful (2)
In reply to Harry Kalantzis

Re: Moodle will use up any and all course memory that you can throw at it when adding an H5P activity

by Paul Quicke -
Looks like like I might be having the same issues (on wordpress H5P and Moodle H5P) with an interactive book, with 5 presentations.
Did you find a solution?
Attachment h5p error.jpg
In reply to Paul Quicke

Re: Moodle will use up any and all course memory that you can throw at it when adding an H5P activity

by Harry Kalantzis -
Unfortunately not. Since the Moodle course where the issue occurred was too big, we split it into multiple smaller courses (i.e. one course section is a separate Moodle course).

So the original course is just a storefront that links to multiple smaller courses. All of them are meta-linked to easily manage enrolments.

And also, we are ditching the H5P plugin and are moving to the core integration.
In reply to Harry Kalantzis

Re: Moodle will use up any and all course memory that you can throw at it when adding an H5P activity

by Harry Kalantzis -
We found out why it happens for us though.

In our case we had a course with 25k enrolments, 7 sections and 10 or so graded H5P activities (each section).

So everytime we were trying to add a new activity, Moodle would recalculate grades for each H5P activity for 25k people (!).

Our IT department mentioned something about 2.5 million records being generated. Which was causing the memory to max out.
Average of ratings: Useful (1)
In reply to Harry Kalantzis

Re: Moodle will use up any and all course memory that you can throw at it when adding an H5P activity

by Paul Quicke -
Looks like it might be something different for me as we are still creating the courses (when the error comes up)
In reply to Paul Quicke

Re: Moodle will use up any and all course memory that you can throw at it when adding an H5P activity

by Harry Kalantzis -
Ah okay, so you mean that you create a course, then Moodle throws the error, but if you go back to the Dashboard/Site Home and search for the course you just created, you can see it? (i.e. it was successfully created behind the scenes, despite the error).

If that's what you mean, then yes, it's a different problem than H5P.

But we had that issue after course creation too!

We were getting the error after course creation in 3.8. The problem is that even though the course was created, Moodle didn't automatically add 'manual enrolments' as enrolment method, which is the default that Moodle usually adds.

So the error seemed to be, presumably, because of the failure of automatically adding the 'manual enrolments' method.

In the Moodle Tracker, there were a few tickets about this and people seemed to suggest that it was a bug.

We recently upgraded to 3.11.4 and we don't get the error after course creation and the 'manual enrolments' method is being added by Moodle automatically without any issues. So all good for us now.

So if you are in an earlier Moodle version, perhaps it's worth upgrading?
In reply to Harry Kalantzis

Re: Moodle will use up any and all course memory that you can throw at it when adding an H5P activity

by Harry Kalantzis -
Sorry I meant 3.10.4!