moodle 4.5 and uploading a large course >1Gb

moodle 4.5 and uploading a large course >1Gb

by John Gourlay -
Number of replies: 2

I have upgraded my test server prior to getting the production server upgraded.

 I am running the latest versions:

  • Ubuntu 24.04
  • moodle 4.5.1
  • php 8.3.6
  • postgresql 16.4

I am running into a problem uploading some very large courses ~1.2Gb to restore them. Smaller courses under 1Gb upload fine.

If I use file picker, I get the never-ending rotating circle. If I drag and drop, the progress bar goes to about 90% and then I get:

Error connecting to the server.

So it is not a connection problem to the server, but appears to be a size or time problem. Tried turning on Debugging but didn’t see anything useful.

I can load the courses by creating a repository and manually copying the file there (and they restore fine), but that would be problematic with a remote server that I don’t have full admin rights on. (Splitting may be an option…)

I have checked all the usual suspects and even made them unusually large to see if that fixes the problem:

php.ini:

max_execution_time = 600

max_input_time = 600

max_input_vars = 5000

memory_limit = -1

post_max_size = 2147483648

upload_max_filesize = 2147483648

 

postgresql.conf:

max_wal_size = 2GB

 

The Extra PHP memory limit is 4096M in Site administration/Server/Performance.

 

Is there anywhere else I should be looking?

John

Average of ratings: -
In reply to John Gourlay

Re: moodle 4.5 and uploading a large course >1Gb

by Ken Task -
Picture of Particularly helpful Moodlers

You've mentioned everything but web service ... apache? nginx?

Might look into:

Apache has a variable: LimitRequestBody
Default is usually unlimited.
0 (unlimited) to 2147483647 (2GB)
https://httpd.apache.org/docs/2.4/mod/core.html#limitrequestbody

Nginx
client_max_body_size
server block, and php block

'SoS', Ken

Average of ratings:Useful (2)
In reply to Ken Task

Re: moodle 4.5 and uploading a large course >1Gb

by John Gourlay -

Ken:

That fixed it. Thank you.

Using apache. I was originally thrown off by references to httpd, and then tried to use <IfModule... wrappers.

I was over thinking it. The answer is much too simple. On this version of ubuntu edit /etc/apache2/apache2.conf and simply add:

LimitRequestBody 2147483647

at the end. 

Thank you again.

John