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

Force reconnect on broken TCP connections #1932

Open
mirek opened this issue Nov 29, 2024 · 0 comments
Open

Force reconnect on broken TCP connections #1932

mirek opened this issue Nov 29, 2024 · 0 comments

Comments

@mirek
Copy link

mirek commented Nov 29, 2024

Issue we're experiencing with ioredis is described here.

Ie. in commonly used setup (ie. client connecting from container/common linux distros) kernel tcp defaults mean that abnormally terminated connections will be seen as ~15 minute failure with no activity on ioredis client (ie. TCP is connected but there is no activity from PoV of the client).

This situation can be controlled by setting net.ipv4.tcp_retries2 = 5 kernel param to lower downtime to roughly 1 minute – but I'd guess many teams are living with this issue possibly doing some hacks like recreating client if their custom heartbeat protocol fails etc.

Should ioredis be providing heartbeat/ping based auto reconnect, ie. something similar to what StackExchange.Redis did to address this issue?

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

No branches or pull requests

1 participant