Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After many hours of recording Oryx writes files in the wrong directory and stops working as intended #197

Open
p4xx07 opened this issue Jul 2, 2024 · 2 comments
Labels
bug Something isn't working EnglishNative This issue is conveyed exclusively in English.

Comments

@p4xx07
Copy link
Contributor

p4xx07 commented Jul 2, 2024

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

image

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
image

@p4xx07 p4xx07 added the bug Something isn't working label Jul 2, 2024
@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jul 2, 2024
@winlinvip
Copy link
Member

winlinvip commented Jul 3, 2024

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.

@Allan-Nava
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working EnglishNative This issue is conveyed exclusively in English.
Projects
None yet
Development

No branches or pull requests

3 participants