Cardano-cli query ledger-state fails

Im trying to run cardano-cli query ledger-state --mainnet --allegra-era --out-file ledger.json
After some time the commands returns Killed in terminal.
ledger.json is arount 10mb in size and is incomplete so Im unable to parse the json-file.

Could this be a memory och swapfile issue perhaps? I have around 3b of free ram so i dont think its that.

Any advise would be greatly appreciated.

cardano-cli --version
cardano-cli 1.25.1 - linux-x86_64 - ghc-8.10
git rev 9a7331cce5e8bc0ea9c6bfa1c28773f4c5a7000f

1 Like

Hello,

That process consuming all resources of the node… you will need to use another way

Check this topic

1 Like

Thank you. I noticed my swap was almost full, its prettty small so must be that.

Is there some other way I could find out when my pool is schedule to produce a block?

We also dump the ledger state every 5 days to determine the block schedule, and it has never failed for us with 4GB RAM + 8GB swap. We only have 8GB because I’ve seen swap use relays go up to 5GB on relays on rare occasions… never the BP… and I hate things that aren’t powers of 2. :rofl:

The general rule for UNIX systems is to have swap at least equal to the amount of physical RAM. You may need a bit more in this case because it needs do read the whole ledger into memory before dumping it. The best way to find the block schedule is what you are already doing… you just need to increase the swap even more.

1 Like