You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
I unplugged the network cable, why ConnectionMultiplexer.IsConnected is true #1822
Since AFAICT there is no mechanism to detect broken TCP socket in this library. Unless the remote end sends a TCP reset. And that does not happen in case of HW failures (or simulated VM ones, e.g. we disabled VM network card). Then your client TCP handling comes in. We are using Linux. And on Linux there is a kernel setting /proc/sys/net/ipv4/tcp_retries2 which results to your TCP socket being reset on the client side in ranges of tens of minutes. Which is a serious problem for any serious Redis use.
You can decrease the setting, e.g. setting it to 3 makes SE.Redis reconnect almost immediately. The problem with that solution is that it is kernel setting affecting the entire machine, in our case that would be Kubernetes worker nodes. I have not found any way to tweak this per process, nor a dotnet runtime setting.
We have a heartbeat in play, but depending on your system configuration (especially on some Linux distros) this can take a while for sockets to fail - that's an artifact of system configuration for all libraries though.
Activity
mrmartan commentedon Aug 13, 2021
Since AFAICT there is no mechanism to detect broken TCP socket in this library. Unless the remote end sends a TCP reset. And that does not happen in case of HW failures (or simulated VM ones, e.g. we disabled VM network card). Then your client TCP handling comes in. We are using Linux. And on Linux there is a kernel setting
/proc/sys/net/ipv4/tcp_retries2which results to your TCP socket being reset on the client side in ranges of tens of minutes. Which is a serious problem for any serious Redis use.You can decrease the setting, e.g. setting it to 3 makes SE.Redis reconnect almost immediately. The problem with that solution is that it is kernel setting affecting the entire machine, in our case that would be Kubernetes worker nodes. I have not found any way to tweak this per process, nor a dotnet runtime setting.
https://access.redhat.com/solutions/726753
mrmartan commentedon Aug 13, 2021
This could be a solution https://stackoverflow.com/a/5907951 but have to test that yet.
NickCraver commentedon Jan 5, 2022
We have a heartbeat in play, but depending on your system configuration (especially on some Linux distros) this can take a while for sockets to fail - that's an artifact of system configuration for all libraries though.
NickCraver commentedon Feb 8, 2022
Happy to reopen if there are follow-up questions here - closing for now to tidy up :)