nim-libp2p/libp2p
Jacek Sieka 17e00e642a
limit write queue length (#376)
To break a potential read/write deadlock, gossipsub uses an unbounded
queue for writes - when peers are too slow to process this queue, it may
end up growing without bounds causing high memory usage.

Here, we introduce a maximum write queue length after which the peer is
disconnected - the queue is generous enough that any "normal" usage
should be fine - writes that are `await`:ed are not affected, only
writes that are launched in an `asyncSpawn` task or similar.

* avoid unnecessary copy of message when there are no send observers
* release message memory earlier in gossipsub
* simplify pubsubpeer logging
2020-09-24 18:43:20 +02:00
..
crypto Refactor minasn1 and fix security issues. (#323) 2020-08-11 16:58:51 -06:00
daemon Gossip one one (#240) 2020-09-21 11:16:29 +02:00
muxers limit write queue length (#376) 2020-09-24 18:43:20 +02:00
protobuf Add `libp2p_dump` and `libp2p_dump_dir` compiler time options. (#359) 2020-09-15 11:16:43 +02:00
protocols limit write queue length (#376) 2020-09-24 18:43:20 +02:00
stream limit write queue length (#376) 2020-09-24 18:43:20 +02:00
transports Remove asyncCheck from codebase. (#345) 2020-09-04 18:30:45 +02:00
cid.nim Less exceptions more results (#188) 2020-05-31 16:22:49 +02:00
connmanager.nim move events to conn manager (#373) 2020-09-23 08:07:16 -06:00
debugutils.nim Add `libp2p_dump` and `libp2p_dump_dir` compiler time options. (#359) 2020-09-15 11:16:43 +02:00
errors.nim warn -> debug log levels in errors.nim 2020-08-20 16:53:28 +09:00
multiaddress.nim Gossip one one (#240) 2020-09-21 11:16:29 +02:00
multibase.nim add side effect annotations (#197) 2020-06-01 09:25:16 +02:00
multicodec.nim Crypto utilities resultification (#150) 2020-05-18 07:25:55 +02:00
multihash.nim add side effect annotations (#197) 2020-06-01 09:25:16 +02:00
multistream.nim Gossip one one (#240) 2020-09-21 11:16:29 +02:00
peerid.nim simplify and unify logging (#353) 2020-09-06 10:31:47 +02:00
peerinfo.nim simplify and unify logging (#353) 2020-09-06 10:31:47 +02:00
standard_setup.nim mplex fixes (#362) 2020-09-14 10:19:54 +02:00
switch.nim small fixes (#374) 2020-09-24 07:30:19 +02:00
transcoder.nim add side effect annotations (#197) 2020-06-01 09:25:16 +02:00
utility.nim Less verbose traces (#112) 2020-03-23 15:03:36 +09:00
varint.nim Less exceptions more results (#188) 2020-05-31 16:22:49 +02:00
vbuffer.nim Less exceptions more results (#188) 2020-05-31 16:22:49 +02:00
wire.nim Less exceptions more results (#188) 2020-05-31 16:22:49 +02:00