Open KyleMaas opened 4 months ago
Okay, so that's coming from here:
produce_friendly_token()
generates a 9-character string by default. So these are apparently temporary directories which would otherwise be deleted by:
So at this point, I'm pretty sure that these extra directories can safely be deleted.
great
Hi @KyleMaas, are you able to trace back which video in your instance did cause this? Maybe it has something to do with:
Another thing that I am very curious to is if this maybe could be caused by a failed upload. Sometimes in MediaCMS the upload displays an error like "upload failed" but afterwards seems to succeed in processing the video. The scenario that I am thinking of is that after getting an error the cleanup actions are halted/skipped.
You mentioned that it not always happens, that is something that triggered me.
By the way, I am not one of the developers/contributers of MediaCMS but I am such a big fan that I descided to dive deeper in it, therefore I am trying to help troubleshooting in some issues.
Best regards!
@foeyonghai Unfortunately, I haven't been able to figure out any commonalities between the videos that are exhibiting the problem. Videos which don't leave behind junk are of similar size, extension, resolution, and duration as ones which don't leave behind junk. "Upload failed" is a fairly common occurrence around here, though, although I can't say all of them that show "upload failed" have this happen or all of them that leave behind junk show "upload failed". So I don't really know. But thanks for helping troubleshoot this!
Describe the issue Sometimes (and I haven't figured out what conditions cause this) the HLS directory will contain a whole bunch of additional directories of video in the format
{media MD5 - 32 characters}{some seemingly-random alphanumeric string - 9 characters}
. Here's an example of just one video that this happened with:These extra directories seem to only contain a
media-1
directory which contain a bunch ofsegment-{number}.ts
files, but they don't containm3u8
files. Only the first one which is just the media MD5 containsm3u8
. I'm not sure these extra directories are actually linked to by anything since I have yet to find in the code what would cause this, so I think the extra directories could probably be deleted, but I don't know. If I runls -l | grep -P '[0-9a-f]{32}.{9}' | wc -l
to find how many of these "extra" directories I have, I get658
. That's a lot of additional space consumption if these are truly extra.To Reproduce Unfortunately, I have no idea how to reproduce this. Some videos have the extra directories, some don't.
Expected behavior Not leave a bunch of junk data on the disk to take up terabytes of additional space.
Screenshots N/A
Environment (please complete the following information):
Additional context Add any other context about the problem here.