bee icon indicating copy to clipboard operation
bee copied to clipboard

Enabling ShareTCPListener triggers excessive logging and high CPU usage

Open acha-bill opened this issue 6 months ago • 2 comments

ShareTCPListener was introduced in PR #5069 to allow Bee to share the same listen address between TCP and WebSocket transports. This is required to enable WebSocket support.

After enabling ShareTCPListener, we observed that nodes started logging sleeping to refresh overdraft balance excessively. This drove CPU very high.

The image below compares the log volume of a node with and without ShareTCPListener enabled (ignore warmup time) Image

The task is to investigate the behavior triggered by enabling ShareTCPListener.

Note that ShareTCPListener is currently opt-in in libp2p, but it is planned to become the default behavior in future libp2p versions.

acha-bill avatar Jun 27 '25 18:06 acha-bill

As I investigated this issue, it could be that upgrading github.com/libp2p/go-libp2p to v0.42.0 , might have fixed the issues we had with github.com/libp2p/go-libp2p v0.33.2

martinconic avatar Jul 08 '25 07:07 martinconic

maybe is it connected to p2p headers? because only swap protocol uses that which can cause this issue.

nugaon avatar Jul 18 '25 15:07 nugaon