trezor / blockbook

:blue_book: Trezor address/account balance backend

Home Page:https://trezor.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BTC & ZEC - "internalState: database is in inconsistent state and cannot be used"

7-of-9 opened this issue · comments

Hi all,

I'm seeing the following error (followed by service shutdown) on the blockbook services (for ZEC and BTC -- all the others I've tried setting up are working fine):

Apr 09 08:20:47 SCP-BB-ZEC01 blockbook[21477]: E0409 08:20:47.000194 21477 blockbook.go:183] internalState: database is in inconsistent state and cannot be used

The corresponding backend services is/are syncd up to the latest block height (although, ZEC backend reports "progres=0.999998" most of the time, the height looks fully syncd).

I've tried removing the blockbook DB and restarting the service (multiple times), i.e. rm -rf /opt/coins/data/zcash/blockbook/db - to no avail: the error is reported after what seems to be a random number of bulk block connects.

I'm running on Ubuntu 18.04, with a very recent commit of BB source. Docker is from sudo apt install docker.io.

Any inputs would be very much appreciated. I'm successfully running eth, dash, vtc, ltc and others -- only zec and btc are giving these problems. I've also successfully fully sync'd a BTC BB node on an earlier commit of the code.

I think the problem is that you do not have enough memory for the initial import and the process is killed by the system. The memory requirements for the initial import in the bulk mode are very big, for ZEC and BTC over 30GB. However, it is possible to run the initial import in less memory hungry mode, see this issue.

@martinboehm -- thanks Martin for the rapid response... that makes some sense (shame the error msg isn't clearer, if so!) I had thought it may be due to the fact I was running Ubuntu: on closer examination of the install docs, I noticed they do specify Debian, and I did have to do some quite dodgy hacking of the apt sources list to get the BB packages to install.

But memory makes much more sense. I'll resize my VMs and retry.

Much appreciated.

Confirmed, increasing VM RAM fixed this. Closing.

thx again @martinboehm !