General help

File size problems

 
Picture of John Iglar
File size problems
 

I've now spent two days on this, so I'm reaching the end of my rope. Any help or suggestions (or just friendly commiseration!) would be greatly appreciated.

I've set up a new Moodle (3.5.2) install on a shared hosting service (A2hosting). I used the cPanel PHPChooser tool to set the file size limit to 1GB, and the system does give me a max 1GB (or at least it says it does). I tried to upload a .mbz file of around 450MB, and it constantly times out every time. I thought it might be problems with uploading, so I set up Google Drive repository. I am able to use the File Picker to successfully transfer small files from GDrive, but it chokes on bigger ones - even a 65MB PDF produced the error "Cannot read file. Either the file does not exist or there is a permission problem."

I've asked for help from my hosting company, but you folks are nicer. Does anyone have any idea about what might cause this?

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: File size problems
Particularly helpful Moodlers
Hi

Are you uploading this file in the web-interface (cpanel) of the hosting or are you in Moodle and trying to upload? "I used the cPanel PHPChooser tool to set the file size limit to 1GB" suggests the former. That has nothing to do with Moodle. If it is the latter, read https://docs.moodle.org/en/File_upload_size.
 
Average of ratings: Useful (1)
Picture of John Iglar
Re: File size problems
 

Thanks, Visvanath. I am using Moodle, and did read that doc. The PHPChooser panel in cPanel allows me to set various parameters in my php settings, including upload_max_filesize, which is what I set to 1G.

 
Average of ratings: -
Picture of Visvanath Ratnaweera
Re: File size problems
Particularly helpful Moodlers
Hi John

You wrote:
> various parameters in my php settings, including upload_max_filesize

Do they also include post_max_size, memory_limit, max_input_time andmax_execution_time? See Rick's post.

And you know that HTTP was not made to upload files of the order of gigabytes?
 
Average of ratings: -
Picture of John Iglar
Re: File size problems
 

Thanks, Visvanath. You made me do further research and I learned something new. Yes, I wanted to FTP the monster file to my server, but I "knew" that Moodle's file system structure was weird (files located in a directory related to their ID, etc), so I thought that wasn't possible. I did some more digging and learned about the FIle System repository - now that's a great solution to have. Going to go set it up in case I have another monster file to deal with!

 
Average of ratings: Useful (1)
Picture of Rick Jerz
Re: File size problems
Particularly helpful Moodlers

John,  there are several settings in your php.ini file that can be affecting your ability to upload a 450MB file.  Here are the ones that I suggest that you try.  Of course, you have to be able to first find the php.ini file that your Moodle is using (Site Admin, PHP info, Loaded configuration file,) and then be able to change these values, which could be tricky on a hosted server.  But maybe A2hosting can make these changes for you.  You can also see your current values by looking at your display of the php info.

upload_max_filesize  = 640M

post_max_size  = 640M

memory_limit = 512M

max_input_time = 1200

max_execution_time = 1200

I would start with the above, but if it still doesn't work, you might consider doubling all of these values.

 
Average of ratings: -
Picture of John Iglar
Re: File size problems
 

Thanks, Rick - very helpful!

 
Average of ratings: -
Picture of John Iglar
Re: File size problems
 

I gave this info to my host's tech support, they made the changes and abracadabra! You're a genius, Rick!

 
Average of ratings: -
Picture of Rick Jerz
Re: File size problems
Particularly helpful Moodlers

So, your Moodle is up and running.  Great!

You can verify these php settings by going to Site Admin, Server, php info.

 
Average of ratings: -
Picture of Ken Task
Re: File size problems
Particularly helpful Moodlers

While the folks over here might be nicer, only those that host with a2hosting would know for certain ... how 2, etc.  (even though what has been suggested works/should work with most host).

Suggest becoming familiar with your hosting set up.

a2Hosting has a Knowledge Base:

https://www.a2hosting.com/kb/developer-corner/php/changing-php-settings-and-versions

Now above link may not be correct for your situation, but, I see in the link above references before each section that say: "To determine if CageFS is enabled for your account, please see ..." then a link.

Have no idea what CageFS is nor what it's function is but that could be "game changer".

'spirit of sharing', Ken



 
Average of ratings: -
Picture of John Iglar
Re: File size problems
 

Thanks, Ken - you're absolutely right. I am working on my  knowledge of my host setup (and am asking their support desk for assistance), but I also wanted any specific Moodle knowledge from this group.

 
Average of ratings: -
Picture of Rick Jerz
Re: File size problems
Particularly helpful Moodlers

John, I saw Ken's post and it made me think of a few more questions.

1) Exactly what did you buy from A2Hosting?  I went to their website, saw that they had many options, so just wondering.

2) Who installed Moodle?  And how?

3) A 450MB course backup file?  This is pretty big.  Do you have any idea why it is this big?  Videos?

4) What are you really trying to do?

5) How did you try to upload a 65MB pdf file?  From within Moodle?

This A2Hosting looks interesting, and one can try it for a month, it appears, at a rather reasonable cost (<$15 US).  It made me want to experiment, if I find the time.

 
Average of ratings: -
Picture of John Iglar
Re: File size problems
 

Thanks, Rick - I really appreciate the help.

1) I'm at the basic level now (I'm on a tight budget) so that might be a limiting factor. (As I said to Ken, I'm mainly looking for Moodle-specific things to chase down here.)

2) Their techs did (presumably through Softaculous) ...that's another long story!

3) Yes, it is big. There are videos there - the course was from Ethiopia where we hosted locally because the internet was dodgy.

4) I'm really trying to restore my course from my old school -want to tinker with it and use it again.

5) I was using the Google Drive repository - again, trying to see if it wasn't an upload timeout problem from my home.


I was looking for a commercial host for a Moodle site. THe host I have for my personal site has limited options in terms of php and so I can't run the latest versions. I have a site on Hostgator and they're even more limited in their options. (I am NOT a server fundi! I had an awesome SysAdmin in my last school who managed the server setup and installs. I'm OK with admin in Moodle's frontend, but flying mostly blind in the rest of it.) I'm not convinced that A2 is as great as they sounded ...still working through teething problems.



Thanks, all of you guys, for all your help! I'm starting Day 3 of trouble-shooting and you've given me things to work on. Much appreciated! I'll report back when I finally get it sorted.

 
Average of ratings: -
Picture of Rick Jerz
Re: File size problems
Particularly helpful Moodlers

Okay, John, you are learning.

We have some parallel discussions going on about videos that might interest you in this other topic on Moodle.org.

Which of these shared plans do you have with A2Hosting, from below?

To tinker with your old course, my recommended approach would be to do it on your PC with a local install of Moodle.  This will allow you to tinker as much as you want, but more important, learn Moodle.

(I am not a server guy either.  I also pay for my hosting myself.)

(As a side note, I see that you might be from Lisbon.  I was in Lisbon earlier this year and really enjoyed this city.  I would love to return someday.)


 
Average of ratings: -
Picture of John Iglar
Re: File size problems
 

Thanks, Rick! I'll check out the videos discussion. I'm using the Lite plan. I'm doing a little more with tinkering with my course - I want to set up the course with changes for my ex-students who are struggling!

Yep, I've moved to Lisbon after teaching in Ethiopia for 9 years. Very happy to be here - it's a lovely place. (I'm outside Lisbon at the moment -nearer to Cascais.)

 
Average of ratings: -
Picture of Rick Jerz
Re: File size problems
Particularly helpful Moodlers

Yep, I was in Cascais and Sintra too.  All very nice towns.

Okay, now I know what you have.  If I find time, I might purchase this Lite system for a month and see if I can manually set up Moodle on it.


 
Average of ratings: -
Picture of John Iglar
Re: File size problems
 

Thanks for all the tips, guys. I got my host to adjust all the PHP settings and I was finally able to upload my monster file. (FWIW I was also unable to upload smaller files, like a 65MB PDF. Yes, it's still big but...) I'm in the process now of restoring my old course. Yay!

Now I need to set up a File System repository so I can really do this via FTP!

 
Average of ratings: -