js-libp2p
js-libp2p copied to clipboard
AutoDial retries creeps up CPU usage over time
-
Version: 1.2.3
-
Platform:
Linux 7e698928f50f 5.15.49-linuxkit-pr #1 SMP PREEMPT Thu May 25 07:27:39 UTC 2023 aarch64 Linux
- Subsystem: Connection manager
Severity: Medium
Description: I was relying on ConnectionManager's minConnections
configuration's default value to be 0 but after an update this default value increased to 50. My P2P network does not have that much nodes, since minConnections become 50; autoDial keeps trying to dialing new nodes and this creates increase in CPU usage over time; which eventually overloads node.js event loop.
Steps to reproduce the error: Set minConnections
config a high number; let node to autoDial over time and monitor Node's CPU usage over time. This can take time.
set in config
connectionManager: {
minConnections: 5
},
yes I already did that as a temporary fix but I don't think this auto dialing feature should creep up memory and cpu usage over time; its really hard to mitigate and identify the exact root cause
yes I already did that as a temporary fix but I don't think this auto dialing feature should creep up memory and cpu usage over time; its really hard to mitigate and identify the exact root cause
yes