-
Notifications
You must be signed in to change notification settings - Fork 239
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
Lack of auto-reconnect #9
Comments
There are two reasons why automatic reconnection is not implemented in redis-lua:
Currently redis-lua 2.0.2 allows developers to define a custom error handler for the Redis module (see |
I think that, at least, redis:ping() should return false without error. Now there is no easy way to check the connection. |
proper code should be
|
Lack of auto-reconnect causes major unreliability in production.
Why is that there is no re-connect like redis-rb?
One trivial solution is every time the client is called, to check for a live connection:
There are two problems with this approach:
pcall(redis_client:ping())
is not efficient.The text was updated successfully, but these errors were encountered: