-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No outbound peer connections when restarting & Sluggish startup #1569
Comments
I've seen this a bit myself, I think the issue is that during a long running rescan, btcd doesn't prioritize regular RPC requests, so certain sub-systems are unable to fully start up. The profiles you've provided should be pretty helpful though, we'll take a look at those and see what the next steps to solve this issue are. |
Aside from the invoice stuff which #1578 should address, I think this is the most relevant section of the profiles:
Basically, if were blocked here to fetch this block, then most of the other sub systems aren't able to properly start up. |
If you could give the two linked PR's a spin that would be super helpful. I think both of these in combo should resolve these slow start up issues. Thanks! |
Running both PR's now and can now addinvoice quickly after startup. Just started running it but seems stalled a bit with no peers. I've also tried manually connecting to peers as shown in the logs below but seems it didn't stay connected and nothing else is being printed in the logs: Without the patches lnd did eventually start connecting outbound yesterday. Will follow up and see how long it takes now. |
In that trace, we see the same issue of the RPC client waiting on btcd to return a block:
|
So it would appear that the issue might actually be with btcd. btcd supports the same profiling (even same arg) that lnd does, so I think a set of profiles or goroutiune dumps for when btcd when lnd is tarting up would allow us to get to the bottom of the issue at hand. |
Related PR btcsuite/btcd#1228 |
With that PR merged, can you try updating your |
I've applied @wpaulino patch to make use of txindex and not scan back all the way to the channel opening time manually. Seems that made everything snappy, I haven't tried the btcd patch but can say for sure it was the ghost pendingchannels and having many of them taking ages to rescan for a txid that won't ever appear. Any way to fix the wrong balance or do I have to manually rescan everything like I did last time? I applied this patch: https://pastebin.com/z4b2WMYk |
Background
Describe your issue here.
Your environment
lnd
0.4.2-beta commit=6dff599d213be4182a70c8eab4cac8a36d3c15e4 but was also running into something similar on pervious commmitsuname -a
on *Nix)Ubuntu x86_64 GNU/Linux
btcd
,bitcoind
, or other backendbtcd version 0.12.0-beta
Steps to reproduce
Tell us how to reproduce this issue. Please provide stacktraces and links to code in question.
Expected behaviour
Tell us what should happen
Outbound connections
Actual behaviour
Tell us what happens instead
Here's what profiling shows:
https://paste.ubuntu.com/p/JxjrqWzrdw/
https://paste.ubuntu.com/p/QJ5k3rjGzn/
In previous commits LND would usually take 20ish minutes to startup and it would eventually. This time it refuses to connect outbound and I left it running overnight.
Seems after another restart I was able to connect to some peers but doesn't auto connect to any others.
2018-07-17 08:27:55.520 is where I restart, and any connections made following that I made manually.
LND logs
https://paste.ubuntu.com/p/4MgWjJqRB4/
Another profiler view from this point http://paste.ubuntu.com/p/tNXp4PX7jC/
The text was updated successfully, but these errors were encountered: