Orphaned Files Not Being Deleted

Orphaned Files Not Being Deleted

by Jeffrey Crump -
Number of replies: 13

When I uploaded my (rather large) first course (Scorm) yesterday the upload failed because it said I ran out of space.  I was forced to upgrade my plan and then resubmit my course, which worked fine.  However, there are nearly 200MB of orphaned files from the failed initial upload that are sitting out there and are not being cleaned up.  

When I recently deleted the course it removed the *clean* version of the files but the original ones are still hanging around and need to be removed.

I'm not sure I understand why Moodle allows you to see files but do nothing with them (e.g. delete them manually).

Anyways, who is supposed to clean these orphaned files up if I can't?

Thanks.

Average of ratings: -
In reply to Jeffrey Crump

Re: Orphaned Files Not Being Deleted

by Matteo Scaramuccia -

Hi Jeffrey,

When I recently deleted the course it removed the *clean* version of the files but the original ones are still hanging around and need to be removed.

they will be removed after 4 days, if you're running Moodle cron at least once per day - you should run it even every 5 minutes per day since Moodle internal locking will prevent a task to be executed more than once when already running.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Orphaned Files Not Being Deleted

by Jeffrey Crump -
Hi. Thanks for the response.

Four days seems a bit slow when a customer is space-constrained and can't upload courses. In any case, the upload routine and database should not commit the files for upload when an error condition occurs; the files should have been automatically deleted. A better option would be a routine should determine if the uploaded package is going to exceed the space (tell the user how much space they are trying to consume and tell them how much they have available) and prevent it from even trying.

That said, thanks for the message!
In reply to Jeffrey Crump

Re: Orphaned Files Not Being Deleted

by Jeffrey Crump -
Oh FFS...I had previously deleted the course and the files were removed. Now trying to re-upload and get this crap again...

This site has reached its file quota. To get more more space, upgrade your plan using the following link https://moodlecloud.com/app/en/portal/view/augeo/plan

This is rediculous.
In reply to Jeffrey Crump

Re: Orphaned Files Not Being Deleted

by Matteo Scaramuccia -

Hi Jeffrey,
if you're using MoodleCloud, please ask for a possible solution in https://support.moodle.com: maybe they're already trashing things within 1 day instead of the 4 days, the standard pruning period.

HTH,
Matteo

In reply to Matteo Scaramuccia

Re: Orphaned Files Not Being Deleted

by Matteo Scaramuccia -

Hi Jeffrey,

they will be removed after 4 days

let me correct my own sentence since it could be "incorrect" here, I was in a rush yesterday: 4 days is the period required by the system to move things out from any draft area and 1 day is the period required to prune the so called trashdir i.e. to definitively remove files from the Moodle file storage pool.

That being said, removing/updating SCORM activities would require 1 day to actually remove those "orphaned" files from the system, by default.
Not sure how Moodle Cloud handles it, maybe using the default setting which is there for good reasons - but I understand your issue being constrained by the small available storage space.

For the record: MDL-31645, MDL-39083.

HTH,
Matteo

Average of ratings: Useful (1)
In reply to Matteo Scaramuccia

Re: Orphaned Files Not Being Deleted

by Jeffrey Crump -

Well it's all just a mystery. Nothing has changed so it's certainly NOT a minute, hour or day timeline.  The issue still exists, I can't use the system, and I have no course files uploaded...just the orphans. The request for a refund was denied despite all this happening in less than 24 hours. And I have a Small school subscription to a service I can't use. You can only imagine how pleased I am. Live and learn. Buyer beware.

Attachment MoodleFuckedUpFiles.PNG
In reply to Jeffrey Crump

Re: Orphaned Files Not Being Deleted

by Ken Task -
Picture of Particularly helpful Moodlers

Pardon intrusion ... yes, 'buyer beware' has always been the case for going for what might have been the 'cheapest' option and, IMHO, hosting where one gives up being in 'control'.

Advise, if now shopping for a place to host your moodle, read the 'fine print' and if not sure ask the hoster.  Gotta be careful there as well cause if you are talking to sales they might promise anything to make the sale.

'SoS'. Ken

In reply to Ken Task

Re: Orphaned Files Not Being Deleted

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Ken, if its MoodleCloud, they are not likely to over promise.
In reply to Marcus Green

Re: Orphaned Files Not Being Deleted

by Ken Task -
Picture of Particularly helpful Moodlers

Don't doubt that at all, Marcus! 😀

'SoS', Ken

In reply to Ken Task

Re: Orphaned Files Not Being Deleted

by Jeffrey Crump -
Taking Ken’s advice and porting to my own instance. Burned AUD 500 to learn

the lesson.



Onward and upward!



On Fri, Mar 20, 2020 at 4:19 PM Ken Task (via Moodle.org) <
In reply to Jeffrey Crump

Re: Orphaned Files Not Being Deleted

by Jeffrey Crump -
Well, the file error still exists, which prevents me from using the service I purchased. It's been five days and so I'm confident I will be successful in fighting MoodleCloud for a refund.

Oh, and GoDaddy hosting isn't an option. They lie on their site that Moodle is supported, however, due to the lack of required filetype support, you can't load the latest versions. You can load an older version of Moodle but that's a poor alternative.

I have moved to Siteground. So far, so good.
In reply to Jeffrey Crump

Re: Orphaned Files Not Being Deleted

by Colegio Victoria -

Hello everyone.  I have the same problem.  The files are piling up and eating up space.  We are using the current Moodle for School / Medium

And after many TICKETS unanswered: Case 00066900 / 33805 / 00066086... 

2) How can we migrate the database data unto our own server???   DATABASE MIGRATION SAYS: "The feature you are trying to access is not available in MoodleCloud."

In reply to Colegio Victoria

Re: Orphaned Files Not Being Deleted

by Jeffrey Crump -
Colegio...I hope things work out better for you than it did for me. I acted fast to make the shift instead of waiting for a response. If you are are on a tight project timeline then I would consider just making the switch now to hosting on Siteground. It's a bit of re-work but in the end you end up with more control and capacity. Let me know if you want the contact details for the offshore team I am working with.