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

Redis standalone client fails eagerly when disconnected #152

Merged
merged 2 commits into from
Mar 5, 2018

Conversation

KarelCemus
Copy link
Owner

Fixes #147

@tzimisce012 I figured out the solution to track the connection status. Since this PR the standalone client fails eagerly when the connection is not established. Would you be kind to test it? Does it resolve the issue you've opened?

@KarelCemus KarelCemus added this to the 2.1.0 milestone Feb 27, 2018
@tzimisce012
Copy link

I'll check this today

@KarelCemus KarelCemus force-pushed the fail-eagerly branch 2 times, most recently from 3c647a7 to 5ce6ecc Compare February 28, 2018 08:13
@KarelCemus KarelCemus force-pushed the fail-eagerly branch 25 times, most recently from 5dcd091 to d933d01 Compare February 28, 2018 13:43
@KarelCemus KarelCemus force-pushed the fail-eagerly branch 2 times, most recently from 2d4d8ee to a03b155 Compare February 28, 2018 14:15
The original too eager solution caused issues
on Travis CI and possibly elsewhere
@tzimisce012
Copy link

This works as expected. Now I am having the following issue. I don't know if this would be related with this PR. When you have a connection with Redis but it is not responding (a lot of requests, maybe), Redis might take 15 minutes to finally answer. In this case, it would be cool to have a timeout when we are doing a getOrElseUpdate. If you have connection with Redis, but the answer takes more than X seconds, use the "default" behavior.

@KarelCemus
Copy link
Owner Author

15 minutes? That looks more like a serious bug ... what takes that long? The get part, the OrElse, or the Update part? Is it possible there is lack of threads due to too many blocking requests?

It doesn't seem right to implement some other timeout without knowing the cause of this long response time

@tzimisce012
Copy link

tzimisce012 commented Mar 1, 2018

Well, imagine that my server is getting a big overload. In my case, a simple ssh took 30 minutes. It is not just a bug on redis or the implementation, it is a problem on the server that contains the instance of redis. It was having problems to make the get but potentially it could give problems when making the set too.

Of course, I will have to do a fine tune on my server too 😄

@KarelCemus
Copy link
Owner Author

Alright, then what about a general request timeout?

@tzimisce012
Copy link

yes, I was wondering if it is a good idea to have a configurable value when making an redis command. Something like "I want to try to get a value from redis but if this value is not returned in less than 250ms I will get a TimeoutException". Right now the behavior is "I want to try to get a value from redis and I will wait unlimited amount of time if I have connection with Redis".

@KarelCemus KarelCemus merged commit e5fe23e into master Mar 5, 2018
@KarelCemus KarelCemus deleted the fail-eagerly branch March 5, 2018 07:37
KarelCemus added a commit that referenced this pull request Dec 2, 2020
Redis standalone client fails eagerly when disconnected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Timeouts
2 participants