-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
multirpc/subpub: set limits on libp2p discovery
The library seems to generally have no default limit, and we've encountered gateways in some environments spiking to as many as 200K goroutines, so this seems like a likely culprit. And even if this is not the cause, setting a limit is a good idea anyway. As a start, we're using four times MaxDHTpeers as the discovery limit for both FindPeers and Advertise. It seems high enough to keep things working, but low enough that we can't run out of memory with hundreds of thousands of goroutines. Updates #243.
- Loading branch information
Showing
2 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters