Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
connectd: increase queue length to 250,000.
The original complaint which caused my investigation was the 100% CPU consumption of connectd, which we traced to the queue to gossipd. However, the issue is not really connectd's overproduction, but gossipd's underconsumption, probably caused by its own queueing issues with the trace messages to lightningd, which the prior patch fixed. Nonetheless, gossipd *can* get busy, and if we were to ask multiple nodes for full gossip, we could see a few hundred thousand messages come it at once. Hence I'm increasing the warning limit to 250,000 messages. This commit is also where we attach the Changelog message, even though it's really "common/msg_queue: use membuf for greater efficiency." and "gossipd: fix excessive msg_queue length from status_trace()" which solved the problem. Here's the backtrace from a previous debug patch: ``` lightning_connectd: msg_queue length excessive (version v24.08.1-17-ga780ad4-modded) 0x5580534051f0 send_backtrace common/daemon.c:33 0x55805340bd5b do_enqueue common/msg_queue.c:66 0x55805340bde5 msg_enqueue common/msg_queue.c:82 0x5580534057ce daemon_conn_send common/daemon_conn.c:161 0x5580533fe3ff handle_gossip_in connectd/multiplex.c:624 0x5580533ff23b handle_message_locally connectd/multiplex.c:763 0x5580533ff2d6 read_body_from_peer_done connectd/multiplex.c:1112 ``` Reported-by: https://github.com/JssDWt Signed-off-by: Rusty Russell <[email protected]> Changelog-Fixed: `connectd` and `gossipd` message queues are much more efficient.
- Loading branch information