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

Add retries when connecting to redis during init #382

Merged
merged 3 commits into from
Jan 26, 2022

Conversation

MikeGoldsmith
Copy link
Contributor

Which problem is this PR solving?

The refinery process only attempts to connect to redis ones during initialization. This can be challenging when redis is started at the same time and causes refinery to error out.

This change allows refinery to keep attempting to connect to redis for up to 10 seconds, with a one second delay between attempts.

Short description of the changes

  • Add timeout of 10 seconds when calling redis.dial with a 1 second delay between attempts

@vreynolds
Copy link
Contributor

Can we keep reporting the underlying connection error? I think it would be useful to have more information when the connection fails.

Copy link
Contributor

@vreynolds vreynolds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎇

Copy link
Contributor

@kentquirk kentquirk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@MikeGoldsmith MikeGoldsmith merged commit c9d009d into main Jan 26, 2022
@MikeGoldsmith MikeGoldsmith deleted the mike/retry-redis-conn branch January 26, 2022 18:06
ghost pushed a commit to opsramp/tracing-proxy that referenced this pull request Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request version: bump minor A PR that adds behavior, but is backwards-compatible.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants