From f912f407c8fe190abe0613d486eabbd01417bf5f Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Wed, 20 Nov 2024 21:11:06 +0800 Subject: [PATCH] lntest: increase `rpcmaxwebsockets` for `btcd` This has been seen in the itest which can lead to the node startup failure, ``` 2024-11-20 18:55:15.727 [INF] RPCS: Max websocket clients exceeded [25] - disconnecting client 127.0.0.1:57224 ``` --- lntest/btcd.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lntest/btcd.go b/lntest/btcd.go index 6b607978e..91b25411c 100644 --- a/lntest/btcd.go +++ b/lntest/btcd.go @@ -94,6 +94,14 @@ func NewBackend(miner string, netParams *chaincfg.Params) ( "--nobanning", // Don't disconnect if a reply takes too long. "--nostalldetect", + + // The default max num of websockets is 25, but the closed + // connections are not cleaned up immediately so we double the + // size. + // + // TODO(yy): fix this in `btcd` to clean up the stale + // connections. + "--rpcmaxwebsockets=50", } chainBackend, err := rpctest.New( netParams, nil, args, node.GetBtcdBinary(),