Your file uploads are temporarily limited after you uploaded a high volume of files. Please wait then try again.

Your file uploads are temporarily limited after you uploaded a high volume of files. Please wait then try again.

by Sean Russell -
Number of replies: 7

Hi,

I'm testing the latest version of Moodle (3.11) and while importing questions into the question bank I have received this message.

"Your file uploads are temporarily limited after you uploaded a high volume of files. Please wait then try again."

My process is to import some questions in a single file (in moodle XML format) that are usually less than 10 mb each. After testing the imported questions, I will go back and do it again. but this error message is slowing down my progress. Is it a setting from PHP or something in the moodle settings? Is there something that I can change in the site administration panel to stop this from happening?

Thanks

Sean

Average of ratings: -
In reply to Sean Russell

Re: Your file uploads are temporarily limited after you uploaded a high volume of files. Please wait then try again.

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I was going to say that does not look like a normal Moodle error message. However, it turns out that it is. It is related to the changes made for https://moodle.org/mod/forum/discuss.php?d=422310 which don't seem to be documented anywhere.
Average of ratings: Useful (3)
In reply to Tim Hunt

Re: Your file uploads are temporarily limited after you uploaded a high volume of files. Please wait then try again.

by Sean Russell -
Hi Tim,

Thanks for pointing me

it is interesting that I am triggering a response so quickly. Given that the uploaded file has been processed and questions added to the question bank, maybe the leak rate of the algorithm could be reconsidered.

Looking at the code added in that patch, I can probably get around by making a small change in filelib.php, or even just by alternating through different accounts. As this is a server I'm only using for testing some ideas I'm not overly worried about DOS attacks.

Thanks
Sean
In reply to Sean Russell

Re: Your file uploads are temporarily limited after you uploaded a high volume of files. Please wait then try again.

by Shamim Rezaie -
Picture of Core developers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers Picture of Translators
=== Not suitable for production servers ===

Hi Sean,

We're using the leaking bucket algorithm there. So if you want the bucket to never become full, the options are either setting a very large size for the bucket or setting a high leaking rate for it (or both).
You can edit your config.php file and set $CFG->draft_area_bucket_capacity to a large value like 5000
You can also set $CFG->draft_area_bucket_leak to a large value like 5000
There is no way you can fill a bucket with that specification smile
Average of ratings: Useful (1)
In reply to Shamim Rezaie

Re: Your file uploads are temporarily limited after you uploaded a high volume of files. Please wait then try again.

by Sean Russell -
Hi Shamim,

Thanks for the information, out of curiosity what are the units of those values. I noticed the capacity of the bucket in the code was 50, is that 50 files? 50 Mb?

I ask because I was uploading a single file at a time and they were all less than 10mb. As you have given me a solution that will work for my case, this info is not important... but I am curious as to how I was managing to hit the limit...

Thanks
Sean
In reply to Sean Russell

Re: Your file uploads are temporarily limited after you uploaded a high volume of files. Please wait then try again.

by Sean Russell -
Just to add to this, before I added the changes you suggested I received this message after uploading only a single file. The file was 3.7mb, but contained almost 100 questions. Could this be triggered because of the number of questions uploaded?

After I made the changes the problem went away...
In reply to Sean Russell

Re: Your file uploads are temporarily limited after you uploaded a high volume of files. Please wait then try again.

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Note, I have reported this issue as MDL-72050.
In reply to Tim Hunt

Re: Your file uploads are temporarily limited after you uploaded a high volume of files. Please wait then try again.

by Sean Russell -
In case anyone else is facing the same problem before this is patched.

I managed to come up with a solution for my use case. I was programmatically creating questions in Moodle xml where the images were base64 encoded in a file tag and referenced in the html.

Instead I now base64 encode the images directly into the img tag in the source data as a string. E.g. "<img src="data:image/svg+xml;base64,PHN2...Pg==" ... >".

I now have no issues uploading large numbers of questions containing images as fast as Moodle can process them.

This is likely not a solution that most can use, but maybe it could be used when exporting questions containing images.

Thanks
Sean