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

Reset Streams Properly #6066

Merged
merged 2 commits into from Jun 1, 2020
Merged

Reset Streams Properly #6066

merged 2 commits into from Jun 1, 2020

Conversation

nisdas
Copy link
Member

@nisdas nisdas commented Jun 1, 2020

What type of PR is this?

Bug Fix

What does this PR do? Why is it needed?

On long running nodes, profile snapshots constantly showed a larger growing heap. Initially it was not obvious what was the root cause, but after a while it became clear that a large amount of streams were not cleaned up properly. While in most situations closing the stream is fine, as the other user will also close the stream on their end too. This allows the yamux session to remove the dead stream and clean it up. However there are situations when the other peer does not reply back or no messages are received,etc. This leads to the stream being left open and not being cleaned up. While it was not an issue with 30 peers, it becomes much worse with a larger number of peers over a period of time.

Which issues(s) does this PR fix?

N.A

Other notes for review

N.A

@nisdas nisdas requested a review from a team as a code owner June 1, 2020 05:52
@nisdas nisdas added Networking P2P related items Ready For Review A pull request ready for code review labels Jun 1, 2020
Copy link
Contributor

@farazdagi farazdagi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nisdas nisdas merged commit ceaceeb into master Jun 1, 2020
@delete-merged-branch delete-merged-branch bot deleted the resetStreams branch June 1, 2020 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Networking P2P related items Ready For Review A pull request ready for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants