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
Slow bitcoind startup #760
Comments
The issue is that |
It shouldn't be that slow though, it appears that there's something else going on there. Can you try a restart, but logging bumped up a level or two? Then make another paste with the results, thanks. |
I see. Thanks for explanation. I temporarily started lnd on neutrino just to sync and now it starts on bitcoind without rescans. I get these rescans when I do not restart lnd for longer periods. I will do debug log once they reappear. |
Here is a trace log of a rescan: https://pastebin.com/VmTUjHUN But I think 10 blocks/sec is quite slow and it is the issue here. I have no idea when BIP 158 is coming, but if its soon, then there is no point wasting time on fixing this the old way. |
Where do you see 10 seconds a block?
Looks to actually be a few ms? It's just due to the fact that From that log, the whole start up took ~2 minutes, which isn't too bad considering that it had to scan a few hundred blocks. |
There's a PR up on the |
Seems like I have similar issue: raspibolt/raspibolt#42 |
@acurious BTC stuck due to the slow start up time? You should only see this when creating new |
It used to start up normally. My lightning node does not start up anymore from yesterday. Keeps starting rescans and hangs. My bitcoind is synced with the Bitcoin network. I have restated the whole node several times. I let the node run for 6 hours without any progress. Edit: some logs: https://pastebin.com/nyvG7xa4 |
My node does deep rescanning after long runs without restart, even though it was running normally up to that point. Maybe it loses some state, I don't know. Other problem is that rescans occasionally stop. It runs for ~15mins on 100% cpu, then drops to 0% and does nothing. Logs end with Starting with neutrino or btcd backend makes resync much faster. I can start with bitcoind right away after syncing with neutrino. |
My node does deep rescannning for ~15mins on 100% cpu, then drops to 1% cpu and does nothing. Logs end with [INF] LNWL: Rescan finished at (...). Restarting multiple times and letting it run does not complete the resync process and the node never starts up. As I understand, neutrino is not an option for LND in mainnet yet. I do not have btcd backend available at the moment. Any ideas how to proceed? |
Update. I set debug level to trace. Last lines from log before hanging are:
Edit: Seems like it hangs every time with same message about possible reorg and disconnecting block
@Roasbeef can you see any issues with lnd here? I do not know if it's related, but the issue started after I seemingly lost some funds for reasons not known to me so far. |
Is your |
If you're running both |
Yes, my |
@acurious, any chance you could put up a copy of your |
@chemicstry, you as well please? |
I have since updated lnd and wiped the database so I no longer have these problems (yet). I think they started to appear when I had 80+ channels open. I'll report if I see them again. I was running on a i7 with 8 gigs of ram. |
I run into issue while having 40+ channels open. I have updated to lnd version 0.4.1-beta after problem occured. |
OK, looks like it might be having some issues dealing with large numbers of channels, even on high-performance machines. Thanks, this gives me a way to try to reproduce! |
In my investigations in the past, the culprit is the way we handle
historical spend dispatches for the bitcoind backend
…On Thu, Apr 5, 2018, 9:52 AM Alex Akselrod ***@***.***> wrote:
OK, looks like it might be having some issues dealing with large numbers
of channels, even on high-performance machines. Thanks, this gives me a way
to try to reproduce!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#760 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA87Ljtzy8duHfKIlgZNZD-XsfZsuRncks5tlkvLgaJpZM4SEJq_>
.
|
Thanks, will take a look and try to optimize, though it might be a larger refactor btcwallet-side to allow the back-end to support multiple rescan/notification clients at one time. |
Tried same setup on my laptop with i5 processor and 4gigs of ram. Similar high load on processor and then no progress. Logs: https://pastebin.com/B2S6TQjW |
Fixed by #1041. |
Installed latest version with go. Run
Did run lnd anyway. It performed a lot of tasks, but alway exits with:
Wonder, if I've done something wrong myself |
If you apply this patch: #975 (comment) You should be able to restart. The particular bug you're running into will be fixed by a pending PR. Optimistically, it should land in master next week. |
Manually changed this line in my file, then run Edit. logs: https://pastebin.com/yeKjhwKj |
LND is starting extremely slowly with bitcoind backend doing rescans.
As you can see in the log, it took 30 minutes and after that it just idles. Restarting lnd does rescanning again but with different subscriptions/blocks. After a numerous restarts it finally starts up and operates normally.
During rescanning LND is loading single cpu core to 100%, bitcoind sits at about 20%. I thought this is due to slow HDD, but iowait is just 1-3%.
Full log of multiple starts: https://pastebin.com/UeC6fCzH
I have heard reports that switching from bitcoind to btcd makes it start instantly, which makes me believe that this issue is exclusive to bitcoind. I have not personally tested with btcd yet (doing it now).
LND version: 7abdd30
The text was updated successfully, but these errors were encountered: