Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fill in the blanks activity memory leak, activity uses 2 GB of memory in moodle but works fine on wordpress #33

Closed
mgancarzdsi opened this issue Mar 14, 2019 · 10 comments

Comments

@mgancarzdsi
Copy link

mgancarzdsi commented Mar 14, 2019

Quoting @thomasmars: "Hi, this is an issue with the implementation of Fill in the Blanks' getXAPIData() function/contract and the xAPI specification. When there are many alternatives for each blank generating the xAPI statement becomes exponentially big. This manifests in Moodle since it is the only platform that calls the getXAPIData() contract to generate reports. Please move this issue to the Blanks repository, as that is the library that has to change its' implementation of getXAPIData() in order to not crash. Thanks."

Originally posted by @thomasmars in h5p/moodle-mod_hvp#259 (comment)

@mgancarzdsi
Copy link
Author

Moved from h5p/moodle-mod_hvp#259 to here, see above for details and below for my user experience.

This activity: https://h5p.org/node/456374 seems to work fine on h5p.org and our own Wordpress site. However, when we import the .h5p file it into our Moodle, clicking "Check" causes Google Chrome to start using memory until it reaches about 2 GB, at which point the tab crashes. In Internet Explorer it takes a while but works, though it uses up roughly 1.7 GB of memory while the activity grading is taking place.

Deleting one of the questions does reduce the memory usage and allows the "Check" to complete without Google Chrome crashing.

We created the activity in our Moodle, on Moodle version 3.5.3 and H5P plugin version 1.14. I also updated our H5P plugin to latest 1.17.1 and the same behaviour still happens.

@TubsDK
Copy link

TubsDK commented Jun 11, 2019

We can verify the same bug which our costumer has reported https://h5p.org/node/530103#comment-form

@thomasmars
Copy link
Member

thomasmars commented Jun 11, 2019

Hi, the issue was solved in f28e78d and f635e9b and is part of the latest version of h5p-blanks, please download it at H5P.org or by updating the content type through the content type hub(H5P editor) on your webpage.

@TubsDK
Copy link

TubsDK commented Jun 11, 2019

Thanks for letting me know - but it seems the current content type version on h5p.org is 1.11 and the current version in the moodle plug is also 1.11
image

image

If i read your git repo correctly, your fix is added to release 1.12

"minorVersion": 12,
. which has yet to be released?

@thomasmars
Copy link
Member

Hmm, you have the correct version then, it should be fixed in version 1.11.4, so you should have the fix then. Are you able to link me the .h5p file in question ?

@thomasmars thomasmars reopened this Jun 11, 2019
@TubsDK
Copy link

TubsDK commented Jun 12, 2019

@thomasmars
Copy link
Member

thomasmars commented Jun 12, 2019

Looking at the library.json of H5P.Blanks-1.11 in that package it says:

{ 
  "title": "Fill in the Blanks",
  "description": "Test your users with fill in the blanks tasks(Cloze tests).",
  "machineName": "H5P.Blanks",
  "majorVersion": 1,
  "minorVersion": 11,
  "patchVersion": 3
}

So the content has either not been upgraded or Fill in the Blanks is not installed properly on your server. I suggest trying to upload H5P.Blanks again to your page, to see if that upgrades the content. I'll run a check to see if it works on my local Moodle site.

@thomasmars
Copy link
Member

Seems to work fine in the latest Moodle plugin version. I uploaded the .h5p file as new content, then went into the content type hub and updated the "Fill in the Blanks" content type, when I revisit the content it is upgraded as expected.

@TubsDK
Copy link

TubsDK commented Jun 12, 2019

Thanks for helping out - we uploaded the 1.11.4. content type manually to the moodle site and now it works beautifully.

@thomasmars
Copy link
Member

Excellent 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants