Skip to content

Management Server is limited to 100 simultaneous peers #1824

Description

@TSJasonH

Describe the problem

After 100 peers have connected the management server stops letting more connect.

To Reproduce

Steps to reproduce the behavior:

  1. Self-Host
  2. Permit more than 100 peers
  3. Have them all connect
  4. after 100 no more get a connection

Expected behavior

A more realistic limit

Are you using NetBird Cloud?

Self-Hosted

NetBird version

0.27.1 (management)

Additional context

For any user beyond the limit, the management log shows these WARN entries:

"{"log":"2024-04-10T12:50:02Z WARN management/server/grpcserver.go:376: failed logging in peer Ij6aLkfZU7qzUOgfzTAZMaaLNAOGsow2SDmdP+8Rxig=\n","stream
":"stderr","time":"2024-04-10T12:50:02.614030981Z"}"

While chatting in the slack my colleague found this reference, which seems that it may be related. Can this be made to a customize-able setting that defaults to 100 if not otherwise specified?

const channelBufferSize = 100

const channelBufferSize = 100

https://github.com/netbirdio/netbird/blob/main/management/server/updatechannel.go#L83-L85

// mbragin: todo shouldn't it be more? or configurable?
channel := make(chan *UpdateMessage, channelBufferSize)
p.peerChannels[peerID] = channel

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions