Bug: freeze if asking for warnings shortly after a restart
Opened this issue · 0 comments
Describe the bug
With too many nodes/channels/warnings that could be computed, using the /api/warnings
endpoint shortly after a restart causes lnd-manageJ to freeze.
To Reproduce
Restart lnd-manageJ on a node with many (also closed) channels, then run
curl -s http://localhost:8081/api/warnings
.
Expected behavior
Command returns after a couple of seconds (at most).
Additional context
It's possible that not enough threads are available for the computation. As most data is not cached after a restart, more computations (and, thus, threads) are used to provide the necessary data. This is done in parallel, possibly even using multiple threads for a single channel. Requesting details for some peers with lots of (closed) channels seems to fix this issue.