Import of question bank failed

Import of question bank failed

by Andreia Madeira -
Number of replies: 9

Hi.

Every time that I try to do an import of a backup of a question bank (format XML Moodle) with more than 10 Mb, it gives an error. This error mentions, always, the last line of the XML file. And I tried with several different files. I am using version 2.8.2.

I tried to do the import of a smaller file (<10 Mb) and it works fine. Is there anywhere a limitation to the file size that I can import that I am not finding?

My problem here is that limitation of the size of the files that I am importing limits the number of questions that I can have in each course.

I intend to create a course with around 3000 questions, each one with detailed solutions. If I do this, I will have backup files to big to be imported in the future and that is concerning me.


I would appreciate some help!


Average of ratings: -
In reply to Andreia Madeira

Re: Import of question bank failed

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

There are no limits enforced by the Moodle code.

The limits are practical, e.g.

  • Amount of memory on the server that PHP is allowed to use for one request.
  • File size upload limit
  • etc.
In reply to Tim Hunt

Re: Import of question bank failed

by Andreia Madeira -

Dear Tim, 

thank you for your answer.

The file that I am trying to import now has 40Mb. It's importing for two hours already with the message (Parsing questions from import file). I already tried in the past with half of the size files (around 20Mb) and it keeps like this or gives me the error that I mentioned before. 

I am also showing a picture from the PHP where the definition for maximum size is 256Mb. So, I don't understand if I am doing something wrong or if 20 Mb is too big for Moodle!


 

Attachment Captura de ecrã 2015-01-22, às 15.51.42.png
Attachment Captura de ecrã 2015-01-22, às 16.19.31.png
In reply to Tim Hunt

Re: Import of question bank failed

by walter wehrle -

I work with 5MB file with 200 questions: With Version 2.7 i get no problems,

but after update to 2.9 i detect the same bad behavior as told.

A work around was to split the question file in smaller pieces.

Nevertheless I am very disappointed from  Moodle. 

1. No a message about this error, the  program just hangs up without any comment.

2.  each update need more resource than the one before, and less efficiency. More

and more requirements for webhoster (memory_limit increases, now the server must support "slash argument" and so on)

We have not able to change our webhoster with everx release.

That is not the way to guaranty a minimun of stability for  the user









In reply to walter wehrle

Re: Import of question bank failed

by Andreia Madeira -

Walter, I feel exactly the same. 

I use moodle since a long time ago, but every time I update the system I feel that I am going to loose my question bank. There are always errors.

I solved my problem as you mentioned, with very small files, but that's unconceivable....


In reply to walter wehrle

Re: Import of question bank failed

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Large question banks have always caused some issues but Moodle has been working on the back up and restore and the new backup format has helped things considerably (this has been an experimental setting but I recommend trying it).

Unfortunately, new minimum requirements is a global thing, not just limited to Moodle.   I disagree that Moodle is less efficient with each release - there has been a lot of work done to make it more efficient.  But, like any website, if your host is limiting resources, then it is going to respond negatively.

As for no error message, do you have Developer Debugging turned on - that should give you a very detailed error message and help you troubleshoot the message.  It is true that sometimes questions get corrupted and it is often just one or two questions that are causing all the issues.

In reply to Emma Richardson

Re: Import of question bank failed

by walter wehrle -

Hi

sorry "experimental setting" and "sometimes questions get corrupted"

is a software for some hobbyist, maybe a system can be errorness,

but NEVER should corrupted user data.

In reply to walter wehrle

Re: Import of question bank failed

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

You are right - when you find a perfect piece of software....for free....please let us know!  I am sure we would all sign up!  Unfortunately, all databases have the potential for some corruption regardless of the software connected to it.

In reply to Emma Richardson

Re: Import of question bank failed

by Colin Fraser -
Picture of Documentation writers Picture of Testers

erm.. there seems a bit of an issue about what "Experimental" means in Moodle. Essentially, it usually says, "all good to go" and I have only noted it in connection to admin tools used in Moodle. I might be wrong, but everytime I have paid attention to Experimental, has been some admin tool. 

Using the zip backup tool is OK, but it has a number of limits, one of which is that things can become corrupted, another is file size limits, and so on. To get around those, Emma is quite correct in recommending the tgz "Experimental" backup, it works well, is more certain backup, and less affected by end file sizes. 

You may also want to go back and read Tim's reply, and ponder the implications of that. 


 

 

In reply to walter wehrle

Re: Import of question bank failed

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I used Microsoft Word for many years and several times a year I would get a corrupted file for no apparent reason. Microsoft are unconstrained by finance, i.e. they can effectively spend as much money as they want to on their software development and yet it will occasionally corrupt files. Like all software Moodle has bugs, and the environment it works within has bugs (the PHP language, the database and the operating system).  In 12 years I have never lost a file in Moodle, but one day I expect I will.