libp2p_kad::handler No older substream waiting to be reused. Dropping new substream. #2957
-
I try to setup a kad network, I enabled kad,relay,ping,identify,gossipsub in my code, and setup one as server with public access. Then I spawn 10~20 clients to connect to this server, client enables kad,ping,identify,gossipsub, and use kad find_closest_peers to update DHT. After some time, the server logs shows many message like below.
Would like to understand what does this message mean? and how to remediate it? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 13 replies
-
To protect against DoS attacks, the kademlia implementation limits the amount of inbound streams that a single remote peer can open on one connection. This limit is currently set to 32 and not configurable. I don't know kademlia in depth (@mxinden does) but 32 streams PER connection sounds like a fair amount to me. It essentially means that a single peer is currently keeping us busy with 32 concurrent requests. Once a request is serviced, the same substream can be re-used again. That is the reuse the message is talking about. Essentially, this warning means that your node is under high load and (temporarily) refusing to service even more requests. |
Beta Was this translation helpful? Give feedback.
-
I have a similar issue with just two peers: #3048 |
Beta Was this translation helpful? Give feedback.
To protect against DoS attacks, the kademlia implementation limits the amount of inbound streams that a single remote peer can open on one connection. This limit is currently set to 32 and not configurable.
I don't know kademlia in depth (@mxinden does) but 32 streams PER connection sounds like a fair amount to me. It essentially means that a single peer is currently keeping us busy with 32 concurrent requests. Once a request is serviced, the same substream can be re-used again. That is the reuse the message is talking about.
Essentially, this warning means that your node is under high load and (temporarily) refusing to service even more requests.