When -ipcbind is used, the node opens one listening socket FD per bound address and accepts concurrent IPC connections. Neither was previously accounted for in min_required_fds, meaning IPC-heavy workloads could silently exhaust available file descriptors.
This PR adds -ipcmaxconnections (default: 16, mirroring -rpcworkqueue) so operators can control how many FDs are reserved for accepted IPC connections. It also adds ipc_bind to account for the listening socket FDs opened per -ipcbind address, which were previously unaccounted for. A warning is emitted when -ipcmaxconnections is set without -ipcbind.
This reserves file descriptors at startup. Upstream PR enforcing the connection limit https://github.com/bitcoin-core/libmultiprocess/pull/269
Note: there is also a draft alternative downstream approach in bitcoin/bitcoin#35037, using the local per-listener limit API proposed in bitcoin-core/libmultiprocess#269 to support per-address max-connections= options on -ipcbind.
So the two concrete directions under discussion are:
- the global
-ipcmaxconnectionsreservation approach in this PR - the per-address
-ipcbind ... max-connections=approach in #35037
Suggested by Sjors in #32297 (comment).