Skip to content

Support external redis host and using 127.0.0.1 as default - #196

Merged
winlinvip merged 4 commits into
ossrs:mainfrom
p4xx07:main
Jul 3, 2024
Merged

Support external redis host and using 127.0.0.1 as default#196
winlinvip merged 4 commits into
ossrs:mainfrom
p4xx07:main

Conversation

@p4xx07

@p4xx07 p4xx07 commented Jul 2, 2024

Copy link
Copy Markdown
Contributor

I want to use my external redis because after many hours of streaming and recording oryx stops working. There are many keys written that get cleaned only after you delete the recording task.
I would like to be able to use my custom redis to support more intensive recordings

@winlinvip winlinvip added the EnglishNative This issue is conveyed exclusively in English. label Jul 2, 2024
Comment thread platform/utils.go Outdated
Comment thread platform/utils.go Outdated
@winlinvip

winlinvip commented Jul 2, 2024

Copy link
Copy Markdown
Member

I believe this requirement is reasonable; thank you for submitting this Pull Request.

At the same time, I would like to discuss an issue with you: If we use an external Redis Server, should we support databases so that multiple Oryx instances can use the same Redis, isolating data through the DB parameter?

redis.NewClient(&redis.Options{Addr, Password, DB: 0})

If you think it's reasonable, then please add an environment variable REDIS_DATABASE, with the default value set to 0.

TRANS_BY_GPT4

@winlinvip winlinvip changed the title added redis address and using 127.0.0.1 as fallback Support external redis host and using 127.0.0.1 as default Jul 2, 2024
@p4xx07

p4xx07 commented Jul 2, 2024

Copy link
Copy Markdown
Contributor Author

Ok I think we can do this. Let me make the changes

@p4xx07

This comment was marked as off-topic.

@p4xx07

p4xx07 commented Jul 2, 2024

Copy link
Copy Markdown
Contributor Author

I've also attempted to run this docker with my modifications, but I noticed even if I have my own redis setup, oryx will attempt to create it's own redis server. How should we face this issue? Do you have any ideas?

@Allan-Nava

Copy link
Copy Markdown

I've also attempted to run this docker with my modifications, but I noticed even if I have my own redis setup, oryx will attempt to create it's own redis server. How should we face this issue? Do you have any ideas?

Same problem

@winlinvip

winlinvip commented Jul 2, 2024

Copy link
Copy Markdown
Member

@winlinvip let me know if we need to do more changes.

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.

This issue is not related to this pull request. Please submit a separate issue with detailed information about it.

TRANS_BY_GPT4

@winlinvip

winlinvip commented Jul 2, 2024

Copy link
Copy Markdown
Member

I've also attempted to run this docker with my modifications, but I noticed even if I have my own redis setup, oryx will attempt to create it's own redis server. How should we face this issue? Do you have any ideas?

This environment variable simply determines which Redis server Oryx connects to. However, Oryx will always create its own Redis server. This should not affect the final outcome, as it consumes very minimal resources and remains unused.

TRANS_BY_GPT4

Comment thread platform/utils.go Outdated
Comment thread platform/utils.go
@p4xx07

p4xx07 commented Jul 2, 2024

Copy link
Copy Markdown
Contributor Author

@winlinvip let me know if we need to do more changes.
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.

This issue is not related to this pull request. Please submit a separate issue with detailed information about it.

TRANS_BY_GPT4

I have created a seperate issue with screenshots detailing the issue. Thanks @winlinvip

#197

@winlinvip
winlinvip merged commit f5ef548 into ossrs:main Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

EnglishNative This issue is conveyed exclusively in English.

Development

Successfully merging this pull request may close these issues.

3 participants