Open p4xx07 opened 3 months ago
I think it's not caused by redis, but the temporary HLS files for record.
See https://github.com/orgs/ossrs/projects/2/views/4?pane=issue&itemId=45110940 Record use HLS as temporary files, but still keep it after convert to MP4 file. So we can improve this by removing the HLS files after converted to MP4.
See https://github.com/orgs/ossrs/projects/2/views/4?pane=issue&itemId=38782310 We should support limit the max duration of recording, so we could cleanup the temporary files ASAP.
I think it's not caused by redis, but the temporary HLS files for record.
See https://github.com/orgs/ossrs/projects/2/views/4?pane=issue&itemId=45110940 Record use HLS as temporary files, but still keep it after convert to MP4 file. So we can improve this by removing the HLS files after converted to MP4.
See https://github.com/orgs/ossrs/projects/2/views/4?pane=issue&itemId=38782310 We should support limit the max duration of recording, so we could cleanup the temporary files ASAP.
@p4xx07 what do you think about these solutions?
Describe the bug
The issue I have been having is that if I record multiple streams for more than 10 hours with a docker with 4GB of ram, Oryx will start writing ts files in the wrong positions in the filesystem, so I'm guessing that redis gets filled up and oryx can't keep track of what he is supposed to do. Oryx will also stop working and won't come back up. If you have any thoughts on how to solve this it would be great. I'm hoping that outsourcing redis from the docker will fix this issue.
Version v5.14.19
To Reproduce Stream with recording ON. After many hours (I tried with 10 hours) ts get saved under data/record instead of data/record/record_id. Oryx stops working as intended and will crash. My docker had 4GB of ram.
Expected behavior Oryx should continue to write to the write directory and not crash.
Screenshots I want to include some screenshots of the ts in the wrong directory. Also the ts have the same creation date which is very strange since the ts save interval is of 10s
Additional context Maybe there is some way to save less information on redis? Is it necessary to save all information about the ts? I'm guessing only the ID is needed to create the playlist to generate the MP4 file. Maybe there is a more memory efficient way of creating this MP4