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

feat: remove reconnect on idle in tcp provider #581

Merged
merged 1 commit into from
Aug 9, 2018

Conversation

tkurki
Copy link
Member

@tkurki tkurki commented Aug 7, 2018

This PR reimplements tcp provider with reconnection logic
implemented with reconnect-core. This adds Fibonacci backoff with
maximum delay of 5 seconds and removes reconnection logic for
idle connections.

Previously tcp provider reconnected idle connections. This is not
needed, because as long as the tcp connection is alive we can assume
that the source is working. Repeated reconnections may be unwanted, as
when instruments are turned off and there is no data available.
OpenPlotter's misconfigured kplex left connections dangling in
CLOSE_WAIT and eventually caused kplex to run out of filedescriptors,
causing error logs to fill storage.
http://forum.openmarine.net/showthread.php?tid=1216

This commit reimplements tcp provider with reconnection logic
implemented with reconnect-core. This adds Fibonacci backoff with
maximum delay of 5 seconds and removes reconnection logic for
idle connections.

Previously tcp provider reconnected idle connections. This is not
needed, because as long as the tcp connection is alive we can assume
that the source is working. Repeated reconnections may be unwanted, as
when instruments are turned off and there is no data available.
OpenPlotter's misconfigured kplex left connections dangling in
CLOSE_WAIT and eventually caused kplex to run out of filedescriptors,
causing error logs to fill storage.
@tkurki tkurki merged commit 09bef66 into master Aug 9, 2018
@tkurki tkurki deleted the reimplement-tcp-provider branch August 9, 2018 18:18
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.

1 participant