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

Update go-libp2p-kad-dht to fix memory leak #539

merged 1 commit into from Nov 18, 2019


Copy link

albrow commented Nov 18, 2019

This is a potential solution to #452. Memory snapshots revealed that*Map).insert was responsible for an unusually large amount of memory (up to 100MB after a few days). That package is used by libp2p/go-libp2p-kad-dht#389 mentions this leak which was reported as fixed in version 0.2.1.

This PR updates to the latest version. We will need to continue to monitor memory usage to see if this fixes the problem.

@@ -319,13 +319,6 @@ func (n *Node) ID() peer.ID {
// Start causes the Node to continuously send messages to and receive messages
// from its peers. It blocks until an error is encountered or `Stop` is called.
func (n *Node) Start() error {
// Note: dht.Bootstrap has a somewhat confusing name. It doesn't automatically

This comment has been minimized.

Copy link

albrow Nov 18, 2019

Author Member

Calling Bootstrap is no longer necessary in the latest version of go-libp2p-kad-dht. See

@albrow albrow requested a review from fabioberger Nov 18, 2019
@albrow albrow merged commit a224600 into development Nov 18, 2019
1 check passed
1 check passed
ci/circleci: build Your tests passed on CircleCI!
@albrow albrow deleted the fix/upgrade-dht branch Nov 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.